How to get the position of some point(x,y) of series?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
wwp3321
Newbie
Newbie
Posts: 60
Joined: Wed Jul 02, 2003 4:00 am

How to get the position of some point(x,y) of series?

Post by wwp3321 » Thu Nov 13, 2008 2:27 am

How Could I get the position (relativing to Form or DeskTop coordinate system ) of some point(x,y) of series?

For Example,I want to get the postion of Point(100,100) of Series1,that relatives to Form or DeskTop coordinate system.

Thansks!

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 13, 2008 8:59 am

Hi wwp3321,

TeeChart provides methods for calculating this positions relative to the chart but you can get form relative positions adding chart position, for example:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var X, Y: Integer;
begin
  X:=Series1.CalcXPosValue(100);
  Y:=Series1.CalcYPosValue(100);

  X:=X+Chart1.Left;
  Y:=Y+Chart1.Top;

  Chart1.Title.Text[0]:=IntToStr(X) + ', ' + IntToStr(Y);
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

wwp3321
Newbie
Newbie
Posts: 60
Joined: Wed Jul 02, 2003 4:00 am

Post by wwp3321 » Fri Nov 14, 2008 12:19 am

Thank you very much! :D

Post Reply