Page 1 of 1

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

Posted: Thu Nov 13, 2008 2:27 am
by 8574101
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!

Posted: Thu Nov 13, 2008 8:59 am
by narcis
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;

Posted: Fri Nov 14, 2008 12:19 am
by 8574101
Thank you very much! :D