Are there any examples of how to group data using the Pie Chart? All of my attempts end with the entire pie showing just one of the possible groups.
| SeriesMapping seriesMapping = new SeriesMapping(); |
| seriesMapping.SeriesDefinition = new PieSeriesDefinition(); |
| seriesMapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("Baker")); |
| ItemMapping itemMappingValue = new ItemMapping("PieID", DataPointMember.YValue, ChartAggregateFunction.Count); |
| seriesMapping.ItemMappings.Add(itemMappingValue); |
| ItemMapping itemMappingKey = new ItemMapping("Baker", DataPointMember.LegendLabel); |
| seriesMapping.ItemMappings.Add(itemMappingKey); |
| RadChart1.SeriesMappings.Add(seriesMapping); |
| List<PieTest> pies = new List<PieTest>(); |
| pies.Add(new PieTest() { PieID = 1, Baker = "John", Crust = "Corn Meal", Filling = "Chili" }); |
| pies.Add(new PieTest() { PieID = 2, Baker = "Peter", Crust = "Graham Cracker", Filling = "Cream Cheese" }); |
| pies.Add(new PieTest() { PieID = 3, Baker = "Paul", Crust = "Graham Cracker", Filling = "Chocolate Cream" }); |
| pies.Add(new PieTest() { PieID = 4, Baker = "Paul", Crust = "Flour", Filling = "Apple" }); |
| RadChart1.ItemsSource = pies; |
So with my example, how would I show a pie chart that represents how many pies each Baker baked?