hitting a point

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
noaksey
Newbie
Newbie
Posts: 55
Joined: Wed May 23, 2007 12:00 am

hitting a point

Post by noaksey » Thu Apr 02, 2009 9:40 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Apr 03, 2009 10:30 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply