Skip to content

Line annotations on single value scale not appearing in correct position in histogram mode #262

@emmacunningham

Description

@emmacunningham

Describe the bug
x-axis line annotations for a single value scale in histogram mode are not correctly positioned, aligning with the leftmost tick along the x-axis.

To Reproduce
Steps to reproduce the behavior:

  1. Create histogram series with only one data value with x value 0
  2. Add line annotation at 0.5
  3. See line annotation positioned at 0

Expected behavior
Should appear correctly aligned with data value's position along x-axis

Screenshots
Incorrect placement of 0.5 annotation when only 1 value (should be in center but is aligned with 0 tick:
image

Correct placement of 0.5 annotation when more than 1 value:
image

Version (please complete the following information):

  • OS: all
  • Browser: all
  • Elastic Charts: 7.2.0

Additional context

Errors in browser console
none

Kibana Cross Issues

Checklist

  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present

Metadata

Metadata

Labels

:annotationAnnotation (line, rect, text) related issuebugSomething isn't workingreleasedIssue released publicly

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions