I'm developing with C + + Builder 2006, TeeChart Pro v8.06.60902 Win32
I am using a TChart component with a TBarSeries, and before upgrading to new version could customize each label of the axis changing font properties in the event OnGetAxisLabel of TChart, and after the upgrade does not work.
Before it was as if every label had its own font, and now it seems a single source for all the labels of an axis.
There is a solution to this effect?
void __fastcall TMyForm::ChartGetAxisLabel(TChartAxis *Sender, TChartSeries *, int ValueIndex, AnsiString &LabelText)
{
if( Sender == Chart->BottomAxis )
{
if( LabelText == "Winner" )
{
Chart->BottomAxis->LabelsFont->Size = 12;
Chart->BottomAxis->LabelsFont->Style = TFontStyles() << fsBold;
Chart->BottomAxis->LabelsFont->Color = clRed;
}
else
{
Chart->BottomAxis->LabelsFont->Size = 8;
Chart->BottomAxis->LabelsFont->Style = TFontStyles();
Chart->BottomAxis->LabelsFont->Color = clBlue;
}
}
}
Customize the font of each label axis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Customize the font of each label axis
Hi Beto,
The only solution I can think of for this is using custom axis labels as shown at the All Features\Welcome!\Axes\Labels\Custom Labels example in the new features demo available at TeeChart's program group.
The only solution I can think of for this is using custom axis labels as shown at the All Features\Welcome!\Axes\Labels\Custom Labels example in the new features demo available at TeeChart's program group.
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 |