Hello,
I started in the use of TChart. I want to customize the position of the marks.
One solution is described here: http://www.teechart.net/support/viewtop ... on+lefttop.
But in my case Series-> Marks->Positions->Count is 0 on AfterDrawValues event.
Le comportement a-t-il changé depuis la publication du post pré-cité ?
Thanks.
Custom mark position
Re: Custom mark position
Bonjour,
I've tested this adding a TBarSeries to a new empty chart at design time; I've also added sample values to it.
Then I've implemented this simple OnAfterDraw event and it seems to work fine for me:
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
I've tested this adding a TBarSeries to a new empty chart at design time; I've also added sample values to it.
Then I've implemented this simple OnAfterDraw event and it seems to work fine for me:
Code: Select all
void __fastcall TForm1::Chart1AfterDraw(TObject *Sender)
{
Caption=Series1->Marks->Positions->Count;
}
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Custom mark position
The other post was talking about Series->OnAfterDrawValues event.
This works in the event Chart->OnAfterDraw.
My problem is solved, thank you.
This works in the event Chart->OnAfterDraw.
My problem is solved, thank you.
Re: Custom mark position
Hello,
Forcing a Chart repaint at OnCreate solves the problem with calling Series1->Marks->Positions->Count at OnAfterDrawValues event. Ie:
Sorry, I misread it.Eic wrote:The other post was talking about Series->OnAfterDrawValues event.
Forcing a Chart repaint at OnCreate solves the problem with calling Series1->Marks->Positions->Count at OnAfterDrawValues event. Ie:
Code: Select all
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Chart1->Draw();
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |