Select & Deselect/Return Slice At PieChart At The Same Time


Hey, I want to know how to return the slice in a PieChart at the same time when I select it. I mean, when a slice is selected, this slice moves outside the Pie (like in the demo of PieChart), but I want this slice returns to its place at the same time it’s selected with the same tap, and not to return with another tap…

Thank you


Hi - do you want to animate the pie slice out & then as soon as it has finished animating, have it return back to it’s original position?



That’s right. That’s exactly what I want…

Thank you


You should be able to create an object that conforms to the SChartAnimationCurve protocol that that bounces in, and then out again. Then you would need to assign this animation curve to your series’ selectionAnimation property:

pieSeries.selectionAnimation.curve = [[MyCustomCurveClass alloc] init];

We have a blog post covering how to do custom animations here for series animations, but the concept is similar for radial series entry animations too.