Problem with line series -> datapoints with same x value -> mouseover/tooltip/etc. #6231
Comments
This is because the spline tooltip searches for the closest point along the X axis only. In most cases this makes it easier to browse the chart. To change the behavior you can set This is also a duplicate of #5983. Should we consider adding an option in the API for this to make it more clear to users? @TorsteinHonsi |
@oysteinmoseng Yes I think it's time for that. The current behaviour is that on scatter charts, the closest point in both x and y dimensions are picked, while in line-like charts, it only looks for the closest point in x dimension only. The rationale for the current behaviour can be seen below. If we searched for the nearest neighbour in two dimensions, a spike in the data set would attract tooltips, so if would be difficult ho hover along the graph to read values successively. The question is, what would be an intuitive name for this new option? |
Wouldn't be better to provide this setting for |
Yes, absolutely. |
Awesome! Thanks for the replies. Thanks in advance! |
This still doesn't work in stockchart, any idea when it will be fixed? |
Hi @1DMF - it looks fine in Highstock, take a look: http://jsfiddle.net/BlackLabel/02mv9nb9/4/ (note: |
Thank you, it was |
Expected behaviour
When two points in the same series of a line chart share the same X value, it should not matter for the mouse-over event. When hovering on one of the points on the same x-value, the datalabel or tooltip corresponding to that specific point would show.
Actual behaviour
When hovering on a point which shares the same x value as another point in the same series, it shows only the tooltip of the point with the highest y value.
Live demo with steps to reproduce
JSFiddle initial (from highcharts demo "Time data with irregular intervals"):
http://jsfiddle.net/gh/get/jquery/3.1.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/spline-irregular-time/
JSFiddle altered:
http://jsfiddle.net/gmeq1zL8/1/
The text was updated successfully, but these errors were encountered: