Page 1 of 1

Custom legend text

Posted: Wed Nov 04, 2009 6:35 pm
by 9641603
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

Re: Custom legend text

Posted: Thu Nov 05, 2009 11:18 am
by 10050769
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,