Keep in mind that the following is only an approximation, it must be accurate, especially if you are approaching a point, but when you look at the position of the mouse, you cannot be directly at the point of your curve. It also assumes that your CurveItem Curve has points, and , which are evenly distributed.
double startPos = Curve.Points[0].X double xStep = Curve.Points[Curve.NPts - 1].X / Curve.NPts; int xIndex = (int)(xPos / xStep + startPos);
OR you can use the following function:
CurveItem n_curve; int index; zedGraphControl1.GraphPane.FindNearestPoint(mousePt, out n_curve, out index);
But keep in mind that this will look for the nearest curve and the index of the nearest point inside that curve.
source share