Hi,
I would like to visualize a 2d pie chart with two labels. Basically I want each slice to have a label with two different information.
For example I want to show the percentage and the Name. Right now I'm only able to show either one.
This is the code
I would like to visualize a 2d pie chart with two labels. Basically I want each slice to have a label with two different information.
For example I want to show the percentage and the Name. Right now I'm only able to show either one.
This is the code
SeriesMapping seriesMapping = new SeriesMapping()
{
ChartArea = chartArea,
};
PieSeriesDefinition pie = new PieSeriesDefinition();
pie.RadiusFactor = 0.5;
pie.ShowItemToolTips =
true;
pie.LabelSettings.ShowConnectors =
true;
pie.LabelSettings.ShowZeroValueLabels =
false;
pie.LabelSettings.SpiderModeEnabled =
true;
seriesMapping.SeriesDefinition = pie;
seriesMapping.ItemMappings.Add(
new ItemMapping("Value", DataPointMember.YValue));
seriesMapping.ItemMappings.Add(
new ItemMapping("Name", DataPointMember.Label));
seriesMapping.ChartArea.EnableAnimations =
false;
pieChart.SeriesMappings.Add(seriesMapping);
pieChart.ItemsSource = items;
}
Thank you