I found an issue in our code that was incorrectly calling chart.Series.Clear() as well as clearing the ObservableCollection we use with the SeriesProvider.
This causes the following exception when the chart tries to redraw.
System.ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
at Telerik.Windows.Controls.ChartView.RadChartBase.RemoveDynamicSeries(ChartSeries series, Int32 index)
at Telerik.Windows.Controls.ChartView.RadChartBase.RemoveDynamicSeries()
at Telerik.Windows.Controls.ChartView.RadChartBase.UpdateDynamicSeries(List`1 actions)
at Telerik.Windows.Controls.ChartView.RadChartBase.OnSeriesProviderStateChanged(List`1 actions)
at Telerik.Windows.Controls.ChartView.ChartSeriesProvider.NotifyListeners()
at Telerik.Windows.Controls.ChartView.ChartSeriesProvider.RefreshAttachedCharts()
at Telerik.Windows.Controls.ChartView.ChartSeriesProvider.<
ScheduleRefreshAttachedCharts
>b__22()
...
I've just switched from 2014 Q3 and this didn't cause any problems in that version.
Obviously this is quite simple once I found it and we shouldn't be manually changing the Series collection when using a SeriesProvider. But it wasn't easy to find when its built into a large application and the stack trace doesn't help much.
Would it be possible to silently cope with this, or perhaps throw an exception when accessing the Series if the graph is using a SeriesProvider, that would make it much easier to find the problem.
Heres a small project to show what happens. Just run it and click the button.
https://dl.dropboxusercontent.com/u/32945770/SeriesProviderError.zip
Thanks,
Martin