Page 1 of 1

Legend

Posted: Tue Sep 04, 2012 7:41 pm
by 15663294
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.

Re: Legend

Posted: Wed Sep 05, 2012 2:53 pm
by 10050769
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,