You must be logged in to post your query.
Home › Forums › Report Bugs › Tootip not showing correct data
When datapoints overlap or are very close, then the visible datapoint is the last series datapoint, but hovering the tooltip shoew value of the first series of the common axis value. I tried the reversed property of tooltip also but still there was no change.
In the fiddle below, hover over the first data point, the color of the marker changes from black to red https://jsfiddle.net/QwZuf/2226/
himanshu,
This behaviour is intentional. When dataPoints of different data series are overlapped, the tooltip is shown for the first series to make the user aware of the hidden data series. You can use shared toolTip feature to show all the available data series. __ Priyanka M S Team CanvasJS
Then what is the use of reversed property in tooltip?
The shared property does not provide list of all overlapped values, but it also includes all other values sharing the common x-axis. So if at x=2, there are 5 datapoints 2 at y=4 and 3 at y=7 and the mouse pointer is at y=7, how can it be known with the shared property that at which datapoint the mouse is because the shared property will return all 5 datapoints.
reversed property of toolTip is used to reverse the order in which the items inside toolTip should be shown. reversed property works only when the shared property is set to true.
__ Priyanka M S Team CanvasJS
Hi Priyanka,
What about the second part of the question?
When the dataPoints are crowded at a particular region, it is not possible to determine on which dataPoint, the mouse has hovered as of now.
If the datapoints are not crowded at a region but far apart, is it then possible to know over which datapoint the mouse is?
@himanshu_tanwar,
You can use mouseover of dataPoint level to know over which dataPoint you have hovered the mouse.
— Vishwas R Team CanvasJS
does this approach work for all cases, or will it fail for datapoints close to one another? and will it trigger multiple times for each overlapping datapoint as well?
If the dataPoints are close to each other, mouseover event will still trigger and console the coordinates of dataPoint hovered as shown in this jsfiddle.
Yes, the mouseover event will be triggered for every dataPoint even if overlapped.
You must be logged in to reply to this topic. Login/Register