I've set up a MVVM approach to using the chart control. The first time a chart control displays it loads correctly and displays all of the data correctly. However, as soon as the the data context changes and a new view model is loaded, I get a null reference exception from the chart control. The stack trace does not contain any reference to my code. Below is the stack trace. Any ideas why this might be happening?
at Telerik.Windows.Controls.Charting.BaseAnimationConverter.GetAnimationSettings()
at Telerik.Windows.Controls.Charting.BaseAnimationConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
at Telerik.Windows.Controls.Charting.StaticConverter`2.Convert(Object value, Object parameter, CultureInfo culture)
at Telerik.Windows.Controls.Charting.StaticConverter`2.Convert(Object value, Object parameter)
at Telerik.Windows.Controls.Charting.BaseChartItem.ConfigureAnimationSettings()
at Telerik.Windows.Controls.Charting.BaseChartItem.SetAnimationSettings()
at Telerik.Windows.Controls.Charting.BaseChartItem.OnApplyTemplate()
at Telerik.Windows.Controls.Charting.BaseLabelChartItem.OnApplyTemplate()
at Telerik.Windows.Controls.Charting.BaseAnimationConverter.GetAnimationSettings()
at Telerik.Windows.Controls.Charting.BaseAnimationConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
at Telerik.Windows.Controls.Charting.StaticConverter`2.Convert(Object value, Object parameter, CultureInfo culture)
at Telerik.Windows.Controls.Charting.StaticConverter`2.Convert(Object value, Object parameter)
at Telerik.Windows.Controls.Charting.BaseChartItem.ConfigureAnimationSettings()
at Telerik.Windows.Controls.Charting.BaseChartItem.SetAnimationSettings()
at Telerik.Windows.Controls.Charting.BaseChartItem.OnApplyTemplate()
at Telerik.Windows.Controls.Charting.BaseLabelChartItem.OnApplyTemplate()