Custom legend text

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Custom legend text

Post by Michal Blazejczyk » Wed Nov 04, 2009 6:35 pm

Hi,

I have a custom legend that uses a palette to display a series of colors. I use a Custom3DPalette object to set up the palette, and then call the following code:

Code: Select all

chart.Legend.LegendStyle = LegendStyles.Palette;
chart.Legend.Series = palette;
chart.Legend.Visible = true;
chart.Legend.MaxNumRows = steps;
It works fine, but I would like to have a better control of how the numbers displayed in the legend are formatted. The trouble is that chart.Legend.Items is still empty after the code above is executed, so cannot simply format the items' text there.

How can I manually change the text associated with legend items, or the format used for formatting them?

Best,
Michal

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Custom legend text

Post by Sandra » Thu Nov 05, 2009 11:18 am

Hello Michal Blazejczyk,
How can I manually change the text associated with legend items, or the format used for formatting them?
I recomend that see Tutorial 5 of TeeChart .Net specifically where section OnGetLegendText, that explain as you have used GetLengendText, and as change Text of the lengend.

I hope will help.

Thanks,
Best Regards,
Sandra Pazos / 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

Post Reply