I am trying out RadControls for WPF Q1 2012.
When setting up line series for a cartesian chart I set the vertical axis in each series. Some of the series can use the same vertical axis so I assign the same linear axis for the vertical axis in each of those series.
Is this the correct way to share a vertical axis between series?
I wonder since if I call Clear() on the chart series after setting things up in this way I get a null reference exception as follows:
System.NullReferenceException was caught
Message=Object reference not set to an instance of an object.
Source=Telerik.Windows.Controls.Chart
StackTrace:
at Telerik.Windows.Controls.ChartView.Axis.OnDetached(RadChartBase oldChart) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\Axis.cs:line 582
at Telerik.Windows.Controls.ChartView.ChartElementPresenter.Detach() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\ChartElementPresenter.cs:line 93
at Telerik.Windows.Controls.ChartView.RadChartBase.OnPresenterRemoved(ChartElementPresenter presenter) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\RadChartBase.cs:line 520
at Telerik.Windows.Controls.ChartView.CartesianSeries.OnDetached(RadChartBase oldChart) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\CartesianChart\Series\CartesianSeries.cs:line 161
at Telerik.Windows.Controls.ChartView.ChartElementPresenter.Detach() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\ChartElementPresenter.cs:line 93
at Telerik.Windows.Controls.ChartView.RadChartBase.OnPresenterRemoved(ChartElementPresenter presenter) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\RadChartBase.cs:line 520
at Telerik.Windows.Controls.ChartView.PresenterCollection`1.ClearItems() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\PresenterCollection.cs:line 61
at XXX.LineChart.SetUpLineChart() in C:\Workspaces\XXX\LineChart.xaml.cs:line 317
The exception doesn't happen if each series has a unique axis.
If this is the correct way of sharing a vertical axis between series then how do I clear the series without getting an exception?
When setting up line series for a cartesian chart I set the vertical axis in each series. Some of the series can use the same vertical axis so I assign the same linear axis for the vertical axis in each of those series.
Is this the correct way to share a vertical axis between series?
I wonder since if I call Clear() on the chart series after setting things up in this way I get a null reference exception as follows:
System.NullReferenceException was caught
Message=Object reference not set to an instance of an object.
Source=Telerik.Windows.Controls.Chart
StackTrace:
at Telerik.Windows.Controls.ChartView.Axis.OnDetached(RadChartBase oldChart) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\Axis.cs:line 582
at Telerik.Windows.Controls.ChartView.ChartElementPresenter.Detach() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\ChartElementPresenter.cs:line 93
at Telerik.Windows.Controls.ChartView.RadChartBase.OnPresenterRemoved(ChartElementPresenter presenter) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\RadChartBase.cs:line 520
at Telerik.Windows.Controls.ChartView.CartesianSeries.OnDetached(RadChartBase oldChart) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\CartesianChart\Series\CartesianSeries.cs:line 161
at Telerik.Windows.Controls.ChartView.ChartElementPresenter.Detach() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\ChartElementPresenter.cs:line 93
at Telerik.Windows.Controls.ChartView.RadChartBase.OnPresenterRemoved(ChartElementPresenter presenter) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\RadChartBase.cs:line 520
at Telerik.Windows.Controls.ChartView.PresenterCollection`1.ClearItems() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Visualization\Common\PresenterCollection.cs:line 61
at XXX.LineChart.SetUpLineChart() in C:\Workspaces\XXX\LineChart.xaml.cs:line 317
The exception doesn't happen if each series has a unique axis.
If this is the correct way of sharing a vertical axis between series then how do I clear the series without getting an exception?