Page 1 of 1

hitting a point

Posted: Thu Apr 02, 2009 9:40 am
by 14045263
Hey,

Do you have any ideas on how I could get a boolean specifying if a given X value on a series falls on a point?

I've tried using:

Code: Select all

this[channel].XValues[nearestPoint] == xValue
but I think the X can be too accurate - I don't want to preform rounding, however. I'm retrieving the X value from a cursor tool.

Have you any ideas if this can be done?

Regards

Chris

Posted: Fri Apr 03, 2009 10:30 am
by narcis
Hi Chris,

Yes, you can use IndexOf:

Code: Select all

			line1.XValues.IndexOf(xValue);
If it is found it will return the index of the point in the ValueList. Otherwise it will return -1.