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

RectAnnotation markers or annotations outside axis #928

Closed
markov00 opened this issue Dec 2, 2020 · 5 comments · Fixed by #1207
Closed

RectAnnotation markers or annotations outside axis #928

markov00 opened this issue Dec 2, 2020 · 5 comments · Fixed by #1207
Assignees
Labels
:annotation Annotation (line, rect, text) related issue enhancement New feature or request released Issue released publicly

Comments

@markov00
Copy link
Member

markov00 commented Dec 2, 2020

Describe the solution you'd like
Some use cases require the annotation to be positioned outside the chart, to improve the chart readability without cluttering with overlapping elements and colors.

We should allow rendering rectangular annotations outside the chart area, for example right below the axis.

Current:
Screenshot 2021-04-07 at 22 18 20

Desired:
Screenshot 2021-04-07 at 22 19 48

Describe alternatives you've considered
For the implementation we can consider multiple alternatives or go in steps:

  1. allow the user to specify a marker for RectAnnotations: the marker can be placed below the annotation in the center, like for a line annotation. A size parameter representing the width of the annotation in pixel, can be passed to the marker component to size it.
  • Add a configuration to allow specifying a RectAnnotation outside the "linked" axis (below, above the horizontal axis, or at the right/ left of the vertical axis), but this can subsequentially be a worm hole of requests/options and configurations.
  • consider the annotation as a composable chart

Additional context

https://codesandbox.io/s/elastic-charts-playground-qs1jr?file=/src/timeseries.tsx

@markov00 markov00 added enhancement New feature or request :annotation Annotation (line, rect, text) related issue labels Dec 2, 2020
@nickofthyme nickofthyme self-assigned this Apr 8, 2021
@sorenlouv
Copy link
Member

For visibility: this is needed for elastic/kibana#96559 which is scheduled for 7.14 (I know, tight deadline).

@nickofthyme
Copy link
Collaborator

nickofthyme commented Jun 16, 2021

@sqren or @smith could you look at this implementation (#1207) and let me know if that will suffice for your use case? Thanks

@sorenlouv
Copy link
Member

Thank you @nickofthyme . I'll defer to @smith since he has been working on this.

@smith
Copy link
Contributor

smith commented Jun 22, 2021

@nickofthyme the implementation on #1207 looks like it fits what we need. cc @katrin-freihofner.

@nickofthyme
Copy link
Collaborator

🎉 This issue has been resolved in version 31.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Jun 29, 2021
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 enhancement New feature or request released Issue released publicly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants