Profile Picture

HitTest bug?

Posted By Jens Wallman 14 Years Ago
Author
Message
Jens Wallman
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 8, Visits: 40

Hi, I'm using the method HitTest to find out which data point that the mouse cursor is over. If the data point is hit I want to show a tooltip with information about the data point. I have a bunch of line series with no markerstyles visible. The hit test works fine for all points except the last point in the line. If i place the mouse over that point the HitTest method returns the second last point. When showing the markerstyles in the series the hit test returns the correct datapoint. This can be reproduced in your example Interactivity->Mouse Events->Tracking Mouse Events. In this example switch to GDI and remove all but the line series. Place the mouse cursor over the last point, the hit test now reports this as datapoint number 8. Turning on the markerstyles will reveal datapoint number 9.

Is this behavior intended or is it a bug? Is there any workaround available for it, other than writing my own hit test algorithm?



bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi Jens,

This is the indented behavior for line segments - if you have a series of data points:
A, B, C

they will be connected with two line segments - AB and BC - therefore we had to take a decision how line segments map to data points and currently the chart maps the line segment to the start point (A or B in the above case). In the case of markers they are rendered separately and the relation there is clear.

Hope this helps - let me know if you have any questions.

Best regards,
Bob





Similar Topics


Reading This Topic