Nearestpoint tool - accessing the nearest point properties
Posted: Sun Oct 30, 2005 11:15 am
I have a chart with nearest point tool and lineserie. I'd like to get at information about the X,Y values of the actual point in the lineseries pointed at by the tool Something like...
procedure TMainForm.ChartTool1Change(Sender: TObject);
var
x:real;
begin
x:=sender.XValue[valueindex];
statusbar.panels[1].text:=floattostrf(x,fffixed,9,1);
end;
So as user moves the mouse the statusbar updates with x/y values.
The sender.xvalue[valueindex] above are what I use in the onclick event for Tlineseries. I can figure out which series the nearesttool is pointing at, but I'm not sure how to find which xvallue and yvalue the nearesttool is pointing at. Have read tutorials and forum, but still struggling. Any advice much appreciated.
thanks
Sean
procedure TMainForm.ChartTool1Change(Sender: TObject);
var
x:real;
begin
x:=sender.XValue[valueindex];
statusbar.panels[1].text:=floattostrf(x,fffixed,9,1);
end;
So as user moves the mouse the statusbar updates with x/y values.
The sender.xvalue[valueindex] above are what I use in the onclick event for Tlineseries. I can figure out which series the nearesttool is pointing at, but I'm not sure how to find which xvallue and yvalue the nearesttool is pointing at. Have read tutorials and forum, but still struggling. Any advice much appreciated.
thanks
Sean