Controlling Order of Items in Legend Box

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Controlling Order of Items in Legend Box

Post by qcrnd » Thu Dec 10, 2009 8:39 am

Hi
I have an chart with 3 area series and I have to add them each differently according the the area which is higher so that no area will be hidden
However I do not want to order of the items in the legend box to change as well. I always want the order of the items to be the same. Currently I see that their order is dependant on the order I add the series to the chart.
How can I control this.
Thanks.

qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Re: Controlling Order of Items in Legend Box

Post by qcrnd » Sun Dec 13, 2009 11:57 am

Hi
You might have missed this one .
Can you please help
Thanks.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Controlling Order of Items in Legend Box

Post by Yeray » Mon Dec 14, 2009 4:38 pm

Hi qcrnd,

You cannot control the legend items order directly without altering the Z order too. What you could do is to add three dummy series in the desired order you wish to be shown in the legend and hide the other series from the legend. See the series' ShowInLegend property.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Re: Controlling Order of Items in Legend Box

Post by qcrnd » Mon Dec 21, 2009 4:30 pm

Hi Yeray
Excellent idea , and it works too :D
Thanks very much .

Post Reply