Best Way to Customize Legend?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
erzsebet
Newbie
Newbie
Posts: 21
Joined: Tue Apr 13, 2010 12:00 am

Best Way to Customize Legend?

Post by erzsebet » Tue Jul 13, 2010 6:53 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Best Way to Customize Legend?

Post by Narcís » Wed Jul 14, 2010 10:15 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

erzsebet
Newbie
Newbie
Posts: 21
Joined: Tue Apr 13, 2010 12:00 am

Re: Best Way to Customize Legend?

Post by erzsebet » Wed Jul 14, 2010 3:06 pm

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

Post Reply