title | page_title | description | type | slug | position | tags | ticketid | res_type |
---|---|---|---|---|---|---|---|---|
NullReferenceException When Using TypePath of CategoricalSeriesDescriptor |
Error If TypePath Property is Used with Chart SeriesDescriptor |
Null Reference Exception occurs when TypePath of RadCartesianChart series descriptor is set. |
how-to |
kb-chartview-nullreferenceexception-when-use-typepath |
0 |
descriptor, path |
1412001 |
kb |
Product Version | 2019.2.510 |
Product | Progress® Telerik® UI for WPF |
Null Reference Exception occurs when TypePath of RadCartesianChart series descriptor is set.
This reproduces only if the Telerik.Windows.Controls.Charting dll is referenced.
This happens when the TypePath property points to a value that holds a type of Telerik.Windows.Controls.Charting.LineSeries (or any other series type), instead of Telerik.Windows.Controls.Chart.LineSeries as expected by the descriptor.
To resolve this use one of the following two solutions.
-
When setting the type of the series, use also its namespace or add a
using
directive that points to Telerik.Windows.Controls.ChartView namespace. -
Or remove the reference to the Telerik.Windows.Controls.Charting dll. It hosts the old RadChart controls.