2

I try to detect when the mouse is over a curve in zedgraph, I am capable of doing it if the mouse is over a point of the curve, but the problem is when the curve has no points in that region,

let me show you an example:

Curve is defined by 2 points: [X=0;Y=10] -- [X=1000;Y=10]

If mouse is at point [X=500;Y=10] it is over the curve, but not over any point so i cannot detect it.

Is there any event which gets fired when mouse is over line but not necessarily over a point?

Thanks

1 Answers1

0

No, this must be done by manual interpolation. See answers posted to my similar question, showing an example of a FindNearestCurve function (I have not tested it)

https://stackoverflow.com/a/5885812/445533

(There is FindNearestObject which works for LineObj though, as detailed in those answers)

Community
  • 1
  • 1
bretddog
  • 5,411
  • 11
  • 63
  • 111
  • That was what I was doing, but I thought there had to be an easier way already implemented in Zedgraph. Thanks for your answer. Regards – user1099368 Dec 16 '11 at 15:30