Skip to content

RectAnnotation with groupId with chart rotation #1205

@nickofthyme

Description

@nickofthyme

Describe the bug
When using a RectAnnotation with groupId and a chartRotation of 90 or -90, where only the x dimensions are specified, creates an incorrect annotation. The annotation attempts to fallback to the height rather than the width in this given case. Given a rotation of 0 or 180 the height default is expected.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/gracious-taussig-vetcd?file=/src/App.tsx
  2. Resize the rendered chart
  3. Notice the width of the chart maintains the height of the chart and not the width.

Expected behaviour
Annotation should default to full width when not specified

Screenshots

Screen.Recording.2021-06-15.at.04.51.53.PM.mp4
Screen.Recording.2021-06-15.at.05.05.53.PM.mp4

Version (please complete the following information):

  • Browser: chrome
  • Elastic Charts: latest

Metadata

Metadata

Assignees

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