How to get nearest data in pointlineseri of a Point?

A forum dedicated to LightningChart Basic.

How to get nearest data in pointlineseri of a Point?

Postby 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) ;
}
saz
 
Posts: 4
Joined: Wed Mar 16, 2016 12:47 pm

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

Postby 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
User avatar
ArctionPasi
 
Posts: 1360
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

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

Postby saz » Sat Apr 02, 2016 6:10 am

i can't find the " SolveNearestDataPointByCoord " function. in which Version there is this function?
saz
 
Posts: 4
Joined: Wed Mar 16, 2016 12:47 pm

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

Postby ArctionPasi » Sat Apr 02, 2016 7:58 am

It is in v.6.0.1 and newer
LightningChart Support Team, PT
User avatar
ArctionPasi
 
Posts: 1360
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland


Return to LightningChart Basic

Who is online

Users browsing this forum: No registered users and 1 guest

cron