Getting visible value range after zooming problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Booner12
Newbie
Newbie
Posts: 3
Joined: Mon Feb 18, 2008 12:00 am
Location: Middletown, CT USA
Contact:

Getting visible value range after zooming problem

Post by Booner12 » Tue Jan 20, 2009 6:28 pm

I am trying to get the visible value range after zooming on a TLineSeries. This is my current code:

Chart1.Draw;
Chart1.Title.Text.Clear;
Chart1.Title.Text.Add(IntToStr(Series1.FirstDisplayedIndex));
Chart1.Title.Text.Add(IntToStr(Series1.FirstDisplayedIndex + Series1.VisibleCount-1));

I get the correct answer for start value (Series1.FirstDisplayedIndex), but the end value is not correct (Series1.FirstDisplayedIndex + Series1.VisibleCount-1). I am using TeeChart Pro v8.02.10861 Win32.

Any suggestions?

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

Post by Narcís » Wed Jan 21, 2009 8:24 am

Hi Booner12,

First of all please notice that current TeeChart Pro v8 VCL release is v8.04. Using it I see that VisibleCount is wrong and added the defect (TV52013762) to the bug list to be fixed. In the meantime, using code below works fine for me here.

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
  Caption:=IntToStr(Series1.FirstDisplayedIndex) + ', ' +
            IntToStr(Series1.FirstDisplayedIndex+Series1.VisibleCount-2);
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