Hi,
I have a pie chart set up, and I've been following the tutorial at http://www.telerik.com/help/wpf/radchart-features-chart-legend.html to set up the legend. I have the UseAutoGeneratedItems set to true for the legend, but the items in the legend are showing as "Item 1", "Item 2", ...etc. Isn't the auto generation supposed to use the categories that the chart is set up to use? Here's the code for the chart:
Thanks!
I have a pie chart set up, and I've been following the tutorial at http://www.telerik.com/help/wpf/radchart-features-chart-legend.html to set up the legend. I have the UseAutoGeneratedItems set to true for the legend, but the items in the legend are showing as "Item 1", "Item 2", ...etc. Isn't the auto generation supposed to use the categories that the chart is set up to use? Here's the code for the chart:
<Telerik:RadChart Name="RefundAmountsByBucketChart" Grid.Row="1" Grid.Column="1" Background="White" Margin="5,5,10,5"> <Telerik:RadChart.DefaultView> <Telerik:ChartDefaultView> <Telerik:ChartDefaultView.ChartTitle> <Telerik:ChartTitle Content="Refund Amounts By Bucket" Background="{x:Null}" Foreground="Black" OuterBorderBrush="{x:Null}" BorderBrush="{x:Null}" /> </Telerik:ChartDefaultView.ChartTitle> <Telerik:ChartDefaultView.ChartLegend> <Telerik:ChartLegend x:Name="RefundAmountsPieChartLegend" UseAutoGeneratedItems="True" Header="Buckets"/> </Telerik:ChartDefaultView.ChartLegend> <Telerik:ChartDefaultView.ChartArea> <Telerik:ChartArea SmartLabelsEnabled="False" LegendName="RefundAmountsPieChartLegend"/> </Telerik:ChartDefaultView.ChartArea> </Telerik:ChartDefaultView> </Telerik:RadChart.DefaultView> <Telerik:RadChart.SeriesMappings> <Telerik:SeriesMapping ItemsSource="{Binding RefundAmountsByBucket}" > <Telerik:SeriesMapping.SeriesDefinition> <Telerik:PieSeriesDefinition ItemLabelFormat="#%{P0}" RadiusFactor="0.75"> <Telerik:PieSeriesDefinition.LabelSettings> <Telerik:RadialLabelSettings ShowZeroValueLabels="False" SpiderModeEnabled="True" ShowConnectors="True" Distance="15"/> </Telerik:PieSeriesDefinition.LabelSettings> </Telerik:PieSeriesDefinition> </Telerik:SeriesMapping.SeriesDefinition> <Telerik:SeriesMapping.ItemMappings> <Telerik:ItemMapping FieldName="Bucket" DataPointMember="XCategory"/> <Telerik:ItemMapping FieldName="RefundAmount" DataPointMember="YValue"/> </Telerik:SeriesMapping.ItemMappings> </Telerik:SeriesMapping> </Telerik:RadChart.SeriesMappings> </Telerik:RadChart>Thanks!