hi, I have a chart with half a dozen line series, each series gets an entry in the chart legend, the entry each being the series name, followed by some stats values like min/max/mean. I'd like to alter the series name and font as shown in legend at run time depending on certain conditions. I have check box in legend for each series. If the data in a series is found not to meet certain conditions, I want to add asterisks to the legen text, and make the legend for that series only have bold font and maybe a coloured background.
I can alter the text with myseries[x].Title:='** BAD **'; but need also something like myseries[x].title.font.color:=clred etc.
any help much appreciated
cheers
Sean
Tlineseries legen fonts
-
- Newbie
- Posts: 19
- Joined: Thu Sep 27, 2007 12:00 am
- Location: UK
- Contact:
Re: Tlineseries legen fonts
Hi Sean,
You can use the OnGetLegendText event to modify the LegendText. However, you can't modify the items font there.
So I'd use OnAfterDraw event to manually draw the customized text over the default legend. You could still set the texts at OnGetLegendText, and set the font color to the same as the legend background, as a simple way to force the legend to have the correct width.
You can use the OnGetLegendText event to modify the LegendText. However, you can't modify the items font there.
So I'd use OnAfterDraw event to manually draw the customized text over the default legend. You could still set the texts at OnGetLegendText, and set the font color to the same as the legend background, as a simple way to force the legend to have the correct width.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |