Locate the nearest point in TPoint3DSeries
Posted: Thu Jan 28, 2016 9:29 am
For TPoint3DSeries, how to locate the nearest point following mouse and use annotation callout to show its coordinates?
Steema Software - Customer Support Forums
http://216.92.101.67/support/
Code: Select all
uses TeeTools;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Aspect.Orthogonal:=false;
Chart1.Chart3DPercent:=100;
Chart1.Aspect.Zoom:=80;
Chart1.Legend.Visible:=false;
Chart1.AddSeries(TPoint3DSeries).FillSampleValues;
with Chart1.Tools.Add(TNearestTool) as TNearestTool do
begin
Series:=Chart1[0];
end;
end;
Code: Select all
ZPosition := (ChartListBox1.SelectedSeries as TPoint3DSeries).CalcZPos(AIndex);