Customize the graphics/text in legend

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Lakshmi
Newbie
Newbie
Posts: 40
Joined: Fri Oct 07, 2005 4:00 am
Location: India
Contact:

Customize the graphics/text in legend

Post by Lakshmi » Thu Mar 23, 2006 9:15 am

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

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

Post by Narcís » Thu Mar 23, 2006 9:44 am

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.
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

Lakshmi
Newbie
Newbie
Posts: 40
Joined: Fri Oct 07, 2005 4:00 am
Location: India
Contact:

Customize the graphics/text in legend

Post by Lakshmi » Thu Mar 23, 2006 10:50 am

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!

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

Post by Narcís » Thu Mar 23, 2006 11:34 am

Hi Lakshmi,

You could try making them visible on legend and set its text to an empty string using the GetLegendText event.
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

Lakshmi
Newbie
Newbie
Posts: 40
Joined: Fri Oct 07, 2005 4:00 am
Location: India
Contact:

Customize the graphics/text in legend

Post by Lakshmi » Thu Mar 23, 2006 12:07 pm

Thanks,
How do we set the size of the legend (width and height)?

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

Post by Narcís » Mon Mar 27, 2006 10:31 am

Hi Lakshmi,

You can use GetLegendRect event as shown in Tutorial 5 - Legend design. You'll find TeeChart tutorials at its program group.
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

Post Reply