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

Highlight a selected bucket #845

Open
cauemarcondes opened this issue Oct 5, 2020 · 1 comment
Open

Highlight a selected bucket #845

cauemarcondes opened this issue Oct 5, 2020 · 1 comment
Labels
enhancement New feature or request :interactions Interactions related issue :xy Bar/Line/Area chart related

Comments

@cauemarcondes
Copy link

Is your feature request related to a problem? Please describe.
APM has the Transactions duration distribution chart, it's a histogram bar chart, that shows the trace waterfall for the selected bucket in the chart.

Screenshot 2020-10-05 at 16 49 58

*The selected bucket is the one that has the border around the bucket.

Currently, there's no easy way to do such a thing on Elastic charts.

Describe the solution you'd like
Maybe a new property where I would pass the index of the selected bucket, or maybe the coordinates or even use the existing styleAccessor to apply a new style to the whole bucket.

Describe alternatives you've considered
I managed to create a workaround for this by creating a ReactAnnotation using the selected bucket coordinates.

@cauemarcondes cauemarcondes added the enhancement New feature or request label Oct 5, 2020
@markov00 markov00 added :interactions Interactions related issue :xy Bar/Line/Area chart related labels Oct 7, 2020
@nickofthyme nickofthyme added this to the Kibana 7.11 milestone Oct 29, 2020
@markov00
Copy link
Member

The workaround provided is the correct way to handle such a case at the moment. The annotation a semantically correct way to describe a selection and provides most features out of the box.

Including a select state on the chart means to deal with the following specific requirements:

  • we should include a selected state style, probably specific for each mark (bar, point, line)
  • we should allow the user to define when something is selected: does the selection comes from an outside event, an event triggered internally like the click or mouse over?
  • we should provide a way to notify that selection? is that a different callback than the click one? What if the selection happens on a brush event?
  • how to deal with overlapping selected elements like when clicking on a point that is on top of a bar? how we define what to include in the selection? should we include a way to specify to propagate the event down the rendering tree?
  • do we want to provide a different tooltip for the selected elements? if so is that included or not within the current crosshair tooltip?
  • does the selection relates just to the clicked marker/element or it has a broader concept like: select the bucket that contains the clicked element.

@markov00 markov00 removed this from the Kibana 7.11 milestone May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :interactions Interactions related issue :xy Bar/Line/Area chart related
Projects
None yet
Development

No branches or pull requests

3 participants