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

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

1 Answer 70 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dennis Perlot
Top achievements
Rank 1
Dennis Perlot asked on 29 Nov 2012, 02:19 PM
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.

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 04 Dec 2012, 01:22 PM
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.

Tags
Chart
Asked by
Dennis Perlot
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or