New to Telerik UI for WPFStart a free 30-day trial

NullReferenceException When Using TypePath of CategoricalSeriesDescriptor

Updated over 6 months ago

Environment

Product Version2019.2.510
ProductProgress® Telerik® UI for WPF

Description

Null Reference Exception occurs when TypePath of RadCartesianChart series descriptor is set.

This reproduces only if the Telerik.Windows.Controls.Charting dll is referenced.

Solution

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.

In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support