This is a migrated thread and some comments may be shown as answers.

Null Reference exception

1 Answer 57 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 19 Jun 2009, 02:40 PM
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()

1 Answer, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 23 Jun 2009, 06:19 AM
Hi Andrew,

Can you, please, give us more details on your use case? A sample project will greatly help us pinpoint the problem and fix it.

Best regards,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart
Asked by
Andrew
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Share this question
or