Is there any way to plot negative values in Pie chart like we can do in Microsoft Excel.
Below are snap shots of two charts having negative values one plotted using telerik chart and another using Excel.
3 Answers, 1 is accepted
Null, empty, negative, and zero values have no effect when calculating ratios. For this reason, these values are not shown on a pie chart. If you want to visually indicate these types of values on your chart, you'd better change the chart type to be something other than a pie chart.
However if you insist on having this in a pie representation, use the absolute value of your data like this for example:
pieSeries.ValueBinding = new GenericDataPointBinding<
ChartData
, decimal>() { ValueSelector = selector => Math.Abs(selector.Value) };
Evgenia
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

You can create a tooltip template where you bind to the business object's property that dictates the real slice value (in our case this is QuantitySold property) like this:
<
telerik:RadPieChart
Grid.Row
=
"2"
Grid.Column
=
"1"
x:Name
=
"RadPieChart"
Width
=
"auto"
Height
=
"auto"
>
<
chart:RadPieChart.Behaviors
>
<
telerik:ChartSelectionBehavior
/>
<
telerik:ChartTooltipBehavior
/>
</
chart:RadPieChart.Behaviors
>
<
telerik:RadPieChart.TooltipTemplate
>
<
DataTemplate
>
<
StackPanel
>
<
TextBlock
Text
=
"{Binding DataItem.Name}"
/>
<
TextBlock
Text
=
"{Binding DataItem.QuantitySold}"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadPieChart.TooltipTemplate
>
<
telerik:PieSeries
SelectedPointOffset
=
"0.6"
x:Name
=
"pieSeries"
>
</
telerik:PieSeries
>
</
telerik:RadPieChart
>
And for the pie slice label, you may still show the absolute value of the QuantitySold property:
ObservableCollection<Product> dataSource =
new
ObservableCollection<Product>()
{
new
Product(){QuantitySold = -5 , Name =
"slice1"
},
new
Product(){QuantitySold = 7 , Name =
"slice2"
},
new
Product(){QuantitySold = 6 , Name =
"slice3"
},
new
Product(){QuantitySold = 2 , Name =
"slice4"
},
new
Product(){QuantitySold = -5 , Name =
"slice5"
},
new
Product(){QuantitySold = -1 , Name =
"slice6"
},
};
pieSeries.ValueBinding =
new
GenericDataPointBinding<Product,
double
>() { ValueSelector = product => Math.Abs(product.QuantitySold) };
pieSeries.ItemsSource = dataSource;
Regards,
Evgenia
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.