Page 1 of 1

Best Way to Customize Legend?

Posted: Tue Jul 13, 2010 6:53 pm
by 16555616
Hello,

I hope you are all having a nice day!! I'm working with TeeChart 8.06 with Delphi 2010. I have a point series and would like to display a legend that shows only unique colors along with some customized text. For example, my point series is plotting a production number versus a date, and the points are colored based upon "country of production". There might be 8 points, but only two different countries. In that case, I would like the legend to show only two items: one for each country. Is overriding the OnGetLegendText event the best way to accomplish this?

Thanks!

-erzsebet

Re: Best Way to Customize Legend?

Posted: Wed Jul 14, 2010 10:15 am
by narcis
Hi erzsebet,

I don't think OnGetLegendText will work for that. I can think of 2 options to achieve what you request:

1. Use 2 series, one for each country. This would display 2 legend items in the chart.
2. Use Custom Legend tool available in TeeChart Pro 2010 VCL.

Hope this helps.

Re: Best Way to Customize Legend?

Posted: Wed Jul 14, 2010 3:06 pm
by 16555616
NarcĂ­s, hello!

Thank you for answering my question. I tried overriding OnGetLegendText before you and you are correct, it does not seem able to do what I want. I appreciate the alternative suggestions you made, and will give them a try!

Have a good day,

-erzsebet