-
Notifications
You must be signed in to change notification settings - Fork 122
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
Click event for points in close proximity #548
Comments
Is there no way to use the same prompt but have the selections default to none selected?
I would worry about introducing this as a UI in charts. You'll start getting into issues with trying to theme this or make this UI compatible with the consumer's styleguide (as we see a lot with external libraries like the one maps uses). It just takes a lot of effort (even if you're using EUI). I truly think that the Charts library should be as UI agnostic as possible and just treat it as a computing and chart rendering agent. It's ok to send back the entire list of "close" points / undeterminable clicks and have the consumer figure out how they want to handle this. With front-end techs these days they can just build a re-usable method for handling multiple vs singular points. Another option I thought of is re-using the tooltip. If consumers only want a single point passed back to them, they could tell the chart to allow "affixing" the tooltip when the user clicks on a point. This will then allow the exact point in the tooltip to be clickable and sent back to the consumer. |
I might be missing something @nickofthyme
Kibana anyway not filtering based on a point selection. Both in TSVB and Visualize filter when brushing the charts. Adding new interactivity to charts is in the form of point selection is not a priority to me |
From the last weekly elastic-chart: the current Kibana behaviour is to apply a filter using the X axis value, so independently on how many series are in the proximity of the current mouse position, we just filter the X value of that point |
Created #562 as future enhancement |
When starting to replace line charts in kibana, I noticed the selection of points that are in very close proximity to each other are ignored.
Kibana today
Notice how now matter where I hover the value is always the top-most value, unless the points far enough apart to warrant a distinction. This effectively makes it impossible for the user to filter on a point that is grouped very closely.
Elastic charts
In Elastic charts, we show/return all points within a given threshold of the click coordinates, notice the selected series in the tooltip.
The problem
The issue I am having is related to filtering from the click event. Elastic charts will send me an array of selected points. I could use this in the filter prompt to allow the user to select the undesirable options but enabling all filter would show no results. Ideally this would not be needed as it promotes a sad path. 😞 Ideally the selection is handled in elastic charts and shows only one point
The solution
After discussing with @markov00 he suggested there be a tooltip selection within elastic charts, whereby clicking near three points will have you select what series you want before emitting the event, with the one series.
I would love any ideas on how we could best handle this in elastic charts.
Marco and I discussed a different
onSelect
event to include multple items but I think that the click should be only a single point, where click and drag region would return all points/things within the selection.Kibana cross issues
There doesn't appear to be a kibana issue for this after a cursory search.
cc. @elastic/kibana-design @timroes @AlonaNadler
The text was updated successfully, but these errors were encountered: