Locate the nearest point in TPoint3DSeries
Locate the nearest point in TPoint3DSeries
For TPoint3DSeries, how to locate the nearest point following mouse and use annotation callout to show its coordinates?
Re: Locate the nearest point in TPoint3DSeries
Hello,
Have you seen the TNearestTool? This seems to work fine for me here:
Have you seen the TNearestTool? This seems to work fine for me here:
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;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Locate the nearest point in TPoint3DSeries
While mouse moving, I want to re-position annotation callout. But a Series only has CalcXPos and CalcYPos, no CalcZPos, how to get ZPosition? And how to set a 3D cursor following on the Series? Please find the attached files.
- Attachments
-
- Example2.zip
- (58.76 KiB) Downloaded 513 times
Re: Locate the nearest point in TPoint3DSeries
Hello,
CalcZPos exists but not for all the TChartSeries (note some series are 2D), so you are only missing a cast. Ie:
CalcZPos exists but not for all the TChartSeries (note some series are 2D), so you are only missing a cast. Ie:
Code: Select all
ZPosition := (ChartListBox1.SelectedSeries as TPoint3DSeries).CalcZPos(AIndex);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |