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

Series DataBinding not working

I want to dynamically generate Series in SfChart so what i did is to databinding Series property to my view model's ChartSeriesCollection property. Problem is when the chart is getting initializing it is showing an exception "Value cannot be null. Parameter name: source". 

SfChart Sample XAML: 

<Charts:SfChart Series="{Binding chartDt.serieses}">                    


chartDt.serieses = new ChartSeriesCollection();
ColumnSeries columnSeries = new ColumnSeries();
columnSeries.ItemsSource = this.Demands;
columnSeries.XBindingPath = "Demand";
columnSeries.YBindingPath = "Year2010";

Stack Trace: 

   at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)
   at Syncfusion.UI.Xaml.Charts.SfChart.InitializeDefaultAxes()
   at Syncfusion.UI.Xaml.Charts.SfChart.UpdateArea(Boolean forceUpdate)
   at Syncfusion.UI.Xaml.Charts.ChartBase.UpdateArea()

What's going wrong? It's noted that the xaml designer of windows phone is showing data bt the app is getting crashed. 

1 Reply

DA Devi Aruna Maharasi Murugan Syncfusion Team November 7, 2016 08:45 AM UTC

Hi Saimoom, 
Thanks for contacting Syncfusion Support. 
We are unable to reproduce the reported problem at our end. We have prepared a demo sample based on your requirement and it can be downloaded from below link, 
Sample: SeriesPhone 
If you are still able to reproduce the reported problem, please revert us by modifying the provided sample. It would be helpful for us to serve you better. 

Live Chat Icon For mobile
Up arrow icon