Page 1 of 1

Customize the graphics/text in legend

Posted: Thu Mar 23, 2006 9:15 am
by 9788742
In my application I have many series and I don't want any of them to be shown in legend, so I set the showinlegend property of the series to false.

but instead I want to customize the legend graphics and text to show my custom information, how do I achieve this?

Thanks

Posted: Thu Mar 23, 2006 9:44 am
by narcis
Hi Lakshmi,

Yes, you have some options here and you can combine them as well:

1. Do something as in the All Features\Welcome !\Miscellaneous\Legend\Drawing more text example at TeeChart's features demo, available at TeeChart's program group.

2. Do something like the What's New?\Welcome !\New in Legend\OnDrawSymbol Event example in the features demo.

3. Custom draw on TeeChart's canvas as shown in some of the examples at All Features\Welcome !\Canvas in the features demo.

Customize the graphics/text in legend

Posted: Thu Mar 23, 2006 10:50 am
by 9788742
Hi Narcis,

Thanks for the information,

I am trying to use:
1> All Features\Welcome !\Miscellaneous\Legend\Drawing more text
2> What's New?\Welcome !\New in Legend\OnDrawSymbol

But since for all the series, showlegend is set to false, these events never get fired and hence my code does not get executed.

How do we get around with this issue?

Thanks!

Posted: Thu Mar 23, 2006 11:34 am
by narcis
Hi Lakshmi,

You could try making them visible on legend and set its text to an empty string using the GetLegendText event.

Customize the graphics/text in legend

Posted: Thu Mar 23, 2006 12:07 pm
by 9788742
Thanks,
How do we set the size of the legend (width and height)?

Posted: Mon Mar 27, 2006 10:31 am
by narcis
Hi Lakshmi,

You can use GetLegendRect event as shown in Tutorial 5 - Legend design. You'll find TeeChart tutorials at its program group.