Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Annotations] Line Annotation and RectAnnotation are misaligned for non-stacked chart #2323

Open
mbondyra opened this issue Feb 2, 2024 · 1 comment · May be fixed by #2327
Open

[Annotations] Line Annotation and RectAnnotation are misaligned for non-stacked chart #2323

mbondyra opened this issue Feb 2, 2024 · 1 comment · May be fixed by #2327
Labels
:annotation Annotation (line, rect, text) related issue bug Something isn't working :xy Bar/Line/Area chart related

Comments

@mbondyra
Copy link
Contributor

mbondyra commented Feb 2, 2024

Describe the issue

  1. here's a sandbox with a stacked bar chart with 2 annotations: https://codesandbox.io/p/sandbox/elegant-allen-tpqfxy?file=%2Fsrc%2FApp.tsx%3A32%2C33
  2. The start time for both annotations are the same and they are nicely aligned.
  3. However the moment you remove stackAccessors prop, they don't start in the same place anymore.

This task is important for Observability team(elastic/kibana#175513).

bug.mp4
@mbondyra mbondyra added the bug Something isn't working label Feb 2, 2024
@markov00 markov00 added :annotation Annotation (line, rect, text) related issue :xy Bar/Line/Area chart related labels Feb 2, 2024
@nickofthyme
Copy link
Collaborator

nickofthyme commented Feb 2, 2024

Yeah definitely a bug, thanks @mbondyra!

It looks like the bad offset is proportional to the number of dodged bars in each band.

2 Bars

image

3 Bars

image

@markov00 markov00 linked a pull request Feb 7, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:annotation Annotation (line, rect, text) related issue bug Something isn't working :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants