Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem with line series -> datapoints with same x value -> mouseover/tooltip/etc. #6231
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.
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"):
changed the title from
Problem with line series -> datapoints with same x value
Problem with line series -> datapoints with same x value -> mouseover
Jan 11, 2017
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
@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?