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

Change chart type at runtime

When I do the following:

mySeries.Type = ChartTypes.Line;

I get the msg:

An unhandled exception of type 'System.NullReferenceException' occurred in Syncfusion.Chart.WPF.dll

Additional information: Object reference not set to an instance of an object.

The "Chart Series Types" documentation says: "The following lines of code can be used to change the ChartSeries type." But does not do so.



1 Reply

AD Administrator Syncfusion Team September 10, 2008 04:42 AM UTC


Hi,

Thanks for your interests in Syncfusion products. The exception mentioned by you is thrown when the ChartSeries (mySeries) object is null. A sample on changing the ChartSeries types at runtime is available in the following location.

http://www.syncfusion.com/development/uploads/ChartTypesSample_9e30c4a2.zip

Please let us know if you have further queries.

Regards,
Athaur Rahman GS


Loader.
Live Chat Icon For mobile
Up arrow icon