Hi Aakash ,
Thanks for using Syncfusion products.
We have analyzed your query and we have checked the given code with simple sample. It does not throw any exception while selection. But series selection misbehaves while clear SelectedDataPointIndex value in SelectionChanging. So, we request you to use SelectionChanged event instead of SelectionChanging in SfChart as follows.
Code snippet [XAML]:
| <chart:SfChart SelectionChanged="chart_SelectionChanged" x:Name="chart"> .. |
Code snippet [C#]:
| private void chart_SelectionChanged(object sender, ChartSelectionEventArgs e) { if (e.SelectedSeries.Label == "Current Period") chart.Series[1].ClearValue(ChartSeries.SelectedDataPointIndexProperty); else chart.Series[0].ClearValue(ChartSeries.SelectedDataPointIndexProperty); } |
We have prepared a sample based on this, please find the sample from the following location.
If still you face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you.
Thanks,
Muneesh Kumar G.