This is a migrated thread and some comments may be shown as answers.

[Solved] Sorting the legend

5 Answers 122 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gifer
Top achievements
Rank 1
Gifer asked on 22 Nov 2010, 08:52 PM
Hi,

I created a pie chart using SerieDefinition. The data is sorted by max-min algorithm. However I would like to display the legend using a different sort. In other words I'd like to show the data in the legend in a different order than the one in the pie. Is this possible?

Thank you. 

5 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 25 Nov 2010, 11:55 AM
Hi Gifer,

You can set reverse order for Legend Items by turning on the ReverseLegendItemsOrder property of the Legend like this:
RadChart1.DefaultView.ChartLegend.ReverseLegendItemsOrder = true;

To be able to make more customizations on Legend Items you should turn off UseAutoGeneratedItems property and manually generate them. This is described in our help topic - http://www.telerik.com/help/silverlight/radchart-features-chart-legend.html#Manual_Legend_Items_Generation.

Best wishes,
Evgenia
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Gifer
Top achievements
Rank 1
answered on 29 Nov 2010, 08:17 PM
Thank you Evgenia,

I have another question. Is it possibile to disable the interactivity between legend and pie chart only when the value is 0% ?
0
Evgenia
Telerik team
answered on 02 Dec 2010, 02:38 PM
Hello Gifer,

Could you be more specific about what you want to show/ hide on the Legend and Chart Area as I couldn't understand your question. Do you want to make invisible all Legend Items which Pie Slice Values are 0%?

Greetings,
Evgenia
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Gifer
Top achievements
Rank 1
answered on 02 Dec 2010, 07:54 PM
The interactivity between pie and legend is enabled, so when the user clicks on one item in the legend the text gets bold and the rispective slice explodes. Now, I would like to keep this effect just for the slices that are not 0% and disable it when the value is 0%. In other words, when the user clicks on the item in the legend, if the data value is 0, the slice will not explode. However if the user clicks on a item which value is different from 0 then the slice explodes.  

Thanks
0
Evgenia
Telerik team
answered on 07 Dec 2010, 05:23 PM
Hello Gifer,

I'm afraid that this is not supported with our RadChart for Silverlight as Selection feature is applied to all Items - there is no way to set some condition whether some of them can be clicked and some can not.

Kind regards,
Evgenia
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
Chart
Asked by
Gifer
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Gifer
Top achievements
Rank 1
Share this question
or