zooming, how to get range of visible values

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
nitin
Newbie
Newbie
Posts: 51
Joined: Thu Aug 22, 2002 4:00 am

zooming, how to get range of visible values

Post by nitin » Fri Apr 20, 2007 5:19 am

hello,

like in topic - how could i get range of visible values on axes after zoom ?


thanks in advance

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

Post by Narcís » Fri Apr 20, 2007 1:38 pm

Hi guzial,

You could do something like this:

Code: Select all

procedure TForm1.Chart1Zoom(Sender: TObject);
begin
  ShowVisibleIndexes;
end;

procedure TForm1.ShowVisibleIndexes;
begin
  Chart1.Draw;
  Chart1.Title.Text.Clear;
  Chart1.Title.Text.Add(IntToStr(Series1.FirstDisplayedIndex));
  Chart1.Title.Text.Add(IntToStr(Series1.FirstDisplayedIndex + Series1.VisibleCount-1));
end;

procedure TForm1.Chart1UndoZoom(Sender: TObject);
begin
  ShowVisibleIndexes;
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

Post Reply