Is it possible to manipulate values displayed on the PIE chart smart labels?

2 posts, 0 answers
  1. Dennis Perlot
    Dennis Perlot avatar
    19 posts
    Member since:
    Dec 2009

    Posted 29 Nov 2012 Link to this post

    Hi Telerik,

    I need to display negative values on a Pie chart, which I understand is not possible as the link bellow states:
    http://www.telerik.com/community/forums/silverlight/chart/pie-chart-and-negative-values.aspx

    So, what I was think as a work around is to pass positive values to the chart itemssource BUT change the smart labels to display the minus symbol with the corresponding slices values.

    Is this possible? Can you provide me with an example?

    Thank you.

  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 04 Dec 2012 Link to this post

    Hi Dennis, 

    Please have in mind that null, empty, negative, and zero values have no effect when calculating ratios. For this reason, these values should not be used with pie chart . If you want to visually indicate such values in a chart, change the chart type to be something other than pie.

    Displaying the values as positive but giving negative labels for them is not recommended from our side as well. However if you want, you can easily achieve this by using the ItemLabelFormat property of the PieSeriesDefinition. In your case you need to specify the following format: ItemLabelFormat = "-#Y". The #Y token is a place holder for the value of the data point. For more information on using the standard .NET formats and the custom RadChart formats visit the Format Expressions help topic.

    I hope this helps.

    All the best,
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top