This is a migrated thread and some comments may be shown as answers.

RadPieChart and PivotChartViewModel

1 Answer 47 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Jared asked on 17 Jul 2018, 09:53 AM

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.


<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" >


In the viewmodel

public LocalDataSourceProvider DataProvider
    get => _dataProvider;
        _dataProvider = value;
        OnPropertyChanged(() => DataProvider);
public PivotChartViewModel ChartViewModel { get; set; }


I'm setting the DataProvider of the ChartViewModel like this.

ChartViewModel.DataProvider = DataProvider


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 19 Jul 2018, 10:01 AM
Hi Jared,

In order to customize the labels of the PieSeries you can set the Style of the DefaultVisual. Please, take a look at the snippet below.
                    <telerik:ChartSeriesLabelDefinition Margin="-30,0,0,0">
                            <Style TargetType="TextBlock">
                                <Setter Property="FontSize" Value="25"/>

Furthermore, you can take a look at the Customizing PieChart Series article and Pie Series SDK Example for a more detailed look over defining customized labels.

I hope this helps, Jared.

Best Regards,
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question