Single selection in pie chart or donut chart


I want only one data point to be selected at a time in my chart (the previously selected data point should be deselected. How can I achieve this?

Is there a property somewhere that sets this behaviour? Or do I have to manually set the Selected property of all other data points to 0/false when a new one is selected?


As far as I can tell, you have to tell slices to select or deselect. You can see an example with the project file in the example they have in this post. They go through all the slices of the pie and deselect the slice, if it doesn’t match the selected index.

The code segment with selection:

for (int j=0; j < sliceCount; j++) {
            SChartLegendSymbol *clickedSymbol = [pieChart.legend.symbols objectAtIndex:j];
            UILabel *clickedLabel = [pieChart.legend.labels objectAtIndex:j];                       
            if (j == selectedIndex) {
                [series setSlice:j asSelected:YES];
                [clickedLabel setTextColor:[ objectAtIndex:j]];
            } else {
                [series setSlice:j asSelected:NO];
                [clickedLabel setTextColor:[UIColor lightGrayColor]];



Thank you jghazarian,

This is how I implemented it in my chart delegate class (Xamarin.iOS code):

protected override void OnToggledSelection(ShinobiChart chart, SChartRadialDataPoint selectedDataPoint, SChartRadialSeries series, PointF pixelPoint)
            if (!selectedDataPoint.Selected) return;

            for (var i = 0; i < series.DataSeries.DataPoints.Count; i++)
                if (i != selectedDataPoint.Index)
                    ((SChartDonutSeries) series).SetSliceAsSelected(i, false);


Awesome, thanks for sharing your final implementation. That should help for anyone checking this question.