This question is locked. New answers and comments are not allowed.
I'm currently attempting to get a simple pie chart working, I have the following data structure returned from my Web Service
I then set up the series mappings as follows:
The pie chart ItemSource is set to a collection of FeedbackChartDataObjects (see above) containing the following data.
When the Pie Chart displays it looks like only 1 series is displayed and the series labels overlap as show in the attached screenshot.
The series also all have the same colour (Green) I would like to be able to either specify the colour it uses or at least have them as different colours.
Thanks in advance
-Matt
public class FeedbackChartData{ public string Legend { get; set; } public int count { get; set; }}I then set up the series mappings as follows:
PieChart.DefaultView.ChartTitle.Content = "Feedback Score Breakdown";PieChart.DefaultView.ChartArea.SmartLabelsEnabled = true;SeriesMapping seriesMapping = new SeriesMapping();seriesMapping.SeriesDefinition = new PieSeriesDefinition();seriesMapping.SeriesDefinition.ItemLabelFormat = "N0";seriesMapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("Legend"));seriesMapping.GroupingSettings.ShouldCreateSeriesForLastGroup = true;ItemMapping yMapping = new ItemMapping("Count", DataPointMember.YValue);ItemMapping catMapping = new ItemMapping("Legend", DataPointMember.LegendLabel);seriesMapping.ItemMappings.Add(yMapping);seriesMapping.ItemMappings.Add(catMapping);PieChart.SeriesMappings.Add(seriesMapping);The pie chart ItemSource is set to a collection of FeedbackChartDataObjects (see above) containing the following data.
{ "Bad", 72 }{ "Good", 1393 }{ "Average", 6766 }When the Pie Chart displays it looks like only 1 series is displayed and the series labels overlap as show in the attached screenshot.
The series also all have the same colour (Green) I would like to be able to either specify the colour it uses or at least have them as different colours.
Thanks in advance
-Matt