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?
Getting visible value range after zooming problem
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |