private static void OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ChartSeries series = d as ChartSeries; series.OnPropertyChanged("SelectedIndex"); if (series.ActualArea == null || series.ActualArea.SelectionBehaviour == null) { return; } if ((series.ActualArea as SfChart).SelectionBehaviour.SelectionStyle == SelectionStyle.Single) { series.SelectedIndexChanged((int)e.NewValue, (int)e.OldValue); } else if ((int)e.NewValue != -1) { series.SelectedSegmentsIndexes.Add((int)e.NewValue); } CircularSeriesBase circularseries = series as CircularSeriesBase; if (circularseries != null && !double.IsNaN(circularseries.GroupTo) && series.ActualArea.Legend != null) { series.ActualArea.UpdateLegend(series.ActualArea.Legend, false); } }
private static void OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ChartSeries series = d as ChartSeries; if (series.ActualArea == null || series.ActualArea.SelectionBehaviour == null) { return; } if (series.ActualArea.SelectionBehaviour.SelectionStyle == SelectionStyle.Single) { series.SelectedIndexChanged((int)e.NewValue, (int)e.OldValue); } else if ((int)e.NewValue != -1) { series.SelectedSegmentsIndexes.Add((int)e.NewValue); } }