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.
Up arrow icon