Hello!
In FormShow, i fill a chart with three series (left axis : values, bottom axis : DateTime).
At the end i call UndoZoom. This shows the chart correctly.
But if i call ZoomPercent right after that (still in FormShow), both axis display zeros along the axis and of course no data in the chart.
If i don't call ZoomPercent in FormShow, but later in a button's click event, it is working.
Can you reproduce this?
Using BCB 5 and TeeChart 7.0.7
Thanx and kind regards,
EH
ZoomPercent doesn't work properly in FormShow
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi EH,
This is because the chart hasn't been drawn yet, you should make a Draw method call before ZoomPercent. The code below works fine for me here.
This is because the chart hasn't been drawn yet, you should make a Draw method call before ZoomPercent. The code below works fine for me here.
Code: Select all
void __fastcall TForm1::FormShow(TObject *Sender)
{
Series1->FillSampleValues();
Series2->FillSampleValues();
Series3->FillSampleValues();
Series1->XValues->DateTime = true;
Chart1->Draw();
Chart1->ZoomPercent(50);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chart1->ZoomPercent(50);
}
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 |
Thanx, this works
I recently switched from 7.0.0 to 7.0.7. In 7.0.0, Draw() was not necessary in 7.0.0.
I didn't find a note in the release notes. So now, i'm not sure,
whether there are further fundamental changes in the behaviour of 7.0.7 compared to 7.0.0.
Is there anything else i have to pay attention or change
Kind regards,
EH
I recently switched from 7.0.0 to 7.0.7. In 7.0.0, Draw() was not necessary in 7.0.0.
I didn't find a note in the release notes. So now, i'm not sure,
whether there are further fundamental changes in the behaviour of 7.0.7 compared to 7.0.0.
Is there anything else i have to pay attention or change
Kind regards,
EH