We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PieChart not rendering

I am trying to make a simple pie chart in WPF using dummy data. My XAML is the following:

        <syncfusion:TabControlExt x:Name="tabControlExt" 
                              IsNewButtonEnabled="False" Grid.ColumnSpan="2">
            <syncfusion:TabItemExt Name="overviewTab" Header="Overview">
                <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <syncfusion:SfChart Grid.Column="0" Grid.ColumnSpan="2" Header="Chart Header" HorizontalAlignment="Center" Margin="10" VerticalAlignment="Center">
                        <syncfusion:PieSeries Palette="Metro" Width="200" Height="200" ConnectorType="Bezier" PieCoefficient=".2" EnableSmartLabels="True" LabelPosition="OutsideExtended"
                                          x:Name="ClusterUserPieSeries" ShowTooltip="True" syncfusion:ChartTooltip.EnableAnimation="True"
                                          ItemsSource="{Binding Path=UserCounts}" YBindingPath="count" XBindingPath="name" Interior="Aqua">
            <syncfusion:TabItemExt Name="clustersTab" Header="Clusters"></syncfusion:TabItemExt>
            <syncfusion:TabItemExt Name="vmTab" Header="VMs"></syncfusion:TabItemExt>

My MainWindow code is the following:

public partial class MainWindow : Window
    public OverviewViewModel OverviewModel;
    public MainWindow()
    private void init()
        if(OverviewModel == null)
            OverviewModel = new OverviewViewModel();
        this.DataContext = OverviewModel;

And inside OverViewModel class is the following:

public class OverviewViewModel
    public IList<OverViewTestClass> UserCounts { getset; }
    public OverviewViewModel()
        UserCounts = new List<OverViewTestClass>();
        UserCounts.Add(new OverViewTestClass(1000"CLUSTER1"));
        UserCounts.Add(new OverViewTestClass(2000"CLUSTER2"));
public class OverViewTestClass
    public int count;
    public string name;
    public OverViewTestClass(int count, string name)
        this.count = count;
        this.name = name;

And yet when I try to run my app, all I get is a blank grid. I've tried to find a detailed walkthrough of the piechart control and how to set it up properly but even when I followed the example (as above) I get nothing. Any ideas?

1 Reply

SA Santhiya Arulsamy Syncfusion Team December 23, 2015 12:39 PM UTC

Hi Matt,

Thanks for contacting Syncfusion support.

We can't refer the path value as variables for XBindingPath and YBindingPath properties in ChartSeries, instead of variables need to refer any defined property. We have modified the sample for your reference.Please find the sample from the following location. 


Please refer the below UG documentation link to make customize the chart look.



Santhiya A

Live Chat Icon For mobile
Up arrow icon