TeeChart Cursor Tool

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rsites
Newbie
Newbie
Posts: 11
Joined: Fri Mar 27, 2009 12:00 am

TeeChart Cursor Tool

Post by rsites » Thu Jan 28, 2010 7:15 pm

Is there a way to read the position of the Cursor Tool as it is moved across the chart? I would like to have two vertical cursors and read the X-Axis position of each of these cursors.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeChart Cursor Tool

Post by Yeray » Fri Jan 29, 2010 9:11 am

Hi rsites,

You should use TCursorTool OnChange event:

Code: Select all

procedure TForm1.ChartTool1Change(Sender: TCursorTool; x, y: Integer;
  const XValue, YValue: Double; Series: TChartSeries; ValueIndex: Integer);
begin
  Caption:='X: '+IntToStr(x)+' Y: '+IntToStr(y);
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

rsites
Newbie
Newbie
Posts: 11
Joined: Fri Mar 27, 2009 12:00 am

Re: TeeChart Cursor Tool

Post by rsites » Fri Jan 29, 2010 1:16 pm

Thanks. Works great.

Post Reply