Legend

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
May
Newbie
Newbie
Posts: 3
Joined: Fri Aug 24, 2012 12:00 am

Legend

Post by May » Tue Sep 04, 2012 7:41 pm

I have a series in a web chart. It shows the data for a Region and all the sub-regions. The actual color of the bar is light blue and if the data is that of the region, we change the color to dark blue as below,

WebChart1.Chart[0].Add(data1, data2, System.Drawing.Color.Blue);

Both of these colors have gradient in it. How can we add a legend which shows a light blue in a rectangle with the text Sub Region next to it and dark blue with Region.

Thanks.

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

Re: Legend

Post by Sandra » Wed Sep 05, 2012 2:53 pm

Hello May,

You have many ways to try to achieve get as you want:
1.- Using a Extra legend tool you can find examples in .Net Demo concretely, in All Features\Welcome !\Tools\Extra Legend
2.- Create a empty series adding the title as you want, so, you can get a new item in the legend with different color.
3.- Create a custom legend, as explain in this thread
4.- Use the OnDrawSymbol event where you can customize the symbols of legend, as you can see in the Demo example All Features\Welcome !\Miscellaneous\Legend\OnDrawSymbol Event
All of this steps, works in .Asp applications and you only need adapt the code in your end. On the other hand, if these suggestions don't help you, please explain exactly what do you do or attach image as you want.

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