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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

NullReferenceException adding series to Chart

Thread ID:





72390 Mar 17,2008 01:13 PM UTC Mar 19,2008 09:54 AM UTC ASP.NET Web Forms (Classic) 1
Tags: Chart
Asked On March 17, 2008 01:13 PM UTC

I am trying to plot a multi-y graph and I am getting a NullReferenceException when I try to add the series to the chart control. The code is very simple:

ChartSeries series;
for(int i=0;i<3;i++)
series = this.ChartWebControl1.Model.NewSeries("MultiY" + i.ToString(), ChartSeriesType.Line);

Random autoRand = new Random();
for (int j=0; j<100; j++)
series.Points.Add(j, j * autoRand.Next());


I do have a Pie Chart and Bar Chart working just fine with similar setups.

I did notice that while tracing the code I get a "series.BackColor threw an exception of type 'System.IndexOutOfRangeException'"


Administrator [Syncfusion]
Replied On March 19, 2008 09:54 AM UTC

Hi David,

Thank you for your interest in Syncfusion Products.

I am afraid I was unable to reproduce the issue. Please refer the sample in this link
http://websamples.syncfusion.com/samples/Chart.Web/ where the code you have given renders Line Chart without throwing an exception.

Can you reproduce the issue in this sample so that we can work in depth and send a better solution?



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon