Skip to content

Annotation does not cover all of x-axis #586

@smith

Description

@smith

Describe the bug

When making a RectAnnotation designed to cover all of the x-axis on a bar chart using the x values, the annotation will not show up if the x1 coordinate is the same as the number of x values. If it's one less, it covers all but the last bar.

To Reproduce

See the example in this CodeSandbox: https://codesandbox.io/s/elastic-charts-annotation-bug-qweje

Expected behavior

The annotation covers the entire x-axis.

Version (please complete the following information):

  • OS: MacOS 10.15.4 Beta (19E258a)
  • Browser: Chrome 80.0.3987.132, all browsers
  • Elastic Charts: 17.1.1

Kibana Cross Issues

Also demonstrated in elastic/kibana#59496.

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

Assignees

Labels

:annotationAnnotation (line, rect, text) related issue:xyBar/Line/Area chart relatedbugSomething 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