I'm trying to bind a RadPieChart to data the user has selected using the RadPivotFieldList. I would like to know how to customise the labels and also how to use the legend with the PieSeries data.
Below is what I have so far, I maybe wildly off the mark with how I'm approaching this. Any feedback would be welcome.
Thanks
<pivot:RadPivotFieldList x:Name="FieldList" DataProvider="{Binding DataProvider}"/><telerik:RadPieChart x:Name="pieChart" Grid.Column="1" Palette="Windows8" DataContext="{Binding ChartViewModel}"> <telerik:PieSeries ValueBinding="Value" ItemsSource="{Binding SeriesSource[0].Items}" ShowLabels="True" > </telerik:PieSeries></telerik:RadPieChart>
In the viewmodel
public LocalDataSourceProvider DataProvider{ get => _dataProvider; set { _dataProvider = value; OnPropertyChanged(() => DataProvider); }}public PivotChartViewModel ChartViewModel { get; set; }
I'm setting the DataProvider of the ChartViewModel like this.
ChartViewModel.DataProvider = DataProvider