How to get nearest data in pointlineseri of a Point?

A forum dedicated to LightningChart Basic.

Moderator: Queue Moderators

Locked
saz
Posts: 4
Joined: Wed Mar 16, 2016 12:47 pm

How to get nearest data in pointlineseri of a Point?

Post by saz » Wed Mar 16, 2016 1:06 pm

i want to get nearest data when double click event fired. it means that i want to catch the Xvalue or Yvalue when i double click in near of the curve( PointLineSeries ) . like this

void m_chart_MouseDoubleClick(object sender, MouseEventArgs e)
{
Point p = e.Location;
var data = ???( p) ;
}

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: How to get nearest data in pointlineseri of a Point?

Post by ArctionPasi » Wed Mar 16, 2016 2:42 pm

LightningChart Ultimate has m_chart.ViewXY.PointLineSeries[0].SolveNearestDataPointByCoord((int)e.X, (int)e.Y, out x, out y, out iNearestIndex); to solve the nearest point.

LightningChart Basic is end-of-life product.
LightningChart Support Team, PT

saz
Posts: 4
Joined: Wed Mar 16, 2016 12:47 pm

Re: How to get nearest data in pointlineseri of a Point?

Post by saz » Sat Apr 02, 2016 6:10 am

i can't find the " SolveNearestDataPointByCoord " function. in which Version there is this function?

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: How to get nearest data in pointlineseri of a Point?

Post by ArctionPasi » Sat Apr 02, 2016 7:58 am

It is in v.6.0.1 and newer
LightningChart Support Team, PT

Locked