Hi, normally when "clearing" a series so that nothing is displayed, it is enough to have series.ItemsSource = Nothing. However, this does not work when LabelsPosition is Inside or when PrimaryAxis is Collapsed.
Attached is a sample.
Source A and B contain data, but C does not. When switching to C the chart is all black, which is correct. Now, change back to A, but change the label position to Inside or Collapsed, then switch to C. The A series are still visible, which is wrong.
I've tried to create a workaround by setting chartPrimaryAxis.LabelsPosition = AxisElementPosition.Outside when the series contains no data, but this doesn't work.
Please help to resolve this issue so that the series can be cleared when label position is set to Inside or Collapsed.
Thank you.
Attachment:
sfChartClearTest_47669c6a.rar