Sorting the legend

6 posts, 0 answers
  1. Gifer
    Gifer avatar
    11 posts
    Member since:
    Oct 2010

    Posted 22 Nov 2010 Link to this post

    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. 
  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 25 Nov 2010 Link to this post

    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
  3. Gifer
    Gifer avatar
    11 posts
    Member since:
    Oct 2010

    Posted 29 Nov 2010 Link to this post

    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% ?
  4. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 02 Dec 2010 Link to this post

    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
  5. Gifer
    Gifer avatar
    11 posts
    Member since:
    Oct 2010

    Posted 02 Dec 2010 Link to this post

    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
  6. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 07 Dec 2010 Link to this post

    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
Back to Top