Exploding Slices on the IGPieChartView
Send Feedback

Glossary Item Box

Topic Overview


This topic provides a conceptual overview of Exploding Slices on the IGPieChartView™ control and demonstrates its configuration using a code example.

In this topic


Exploding slices summary

An Exploded Pie Chart is any pie chart with one or more slices separated from the rest of the pie. In the following graphic, slice 3 is Exploded. The Exploded slices, once separated from the pie framework, are controlled by the explodedRadius property and rendered at a distance from the center of origin.

To create additional exploded slices start by adding their index to an NSMutableIndexSet, and then assigning it to the explodedSlices property. Additionally, when using the pieChartView:tapWithItem:atPoint: method from the IGPieChartViewDelegate, the item parameter contains a reference to the IGPieSliceInfo object. This object has a configurable property named isExploded that explodes the tapped slice.

Exploding Slices on the IGPieChartView – Code Example


The code below adds three indexes of IGPieChartView slices to an NSMutableIndexSet and sets the object to the explodedSlices property. The result is three exploded slices separated from the pie’s center and each other.


This code example requires the inclusion of the IG framework, detail about how to add this framework can be found in the Adding the Chart Framework File topic.


In C#:

IGPieChartView _pieChartView = new IGPieChartView();
NSMutableIndexSet exploded = new NSMutableIndexSet();
_pieChartView.ExplodedSlices = exploded;

In Objective-C:

NSMutableIndexSet *exploded = [[NSMutableIndexSet alloc]init];[exploded addIndex:0];[exploded addIndex:2];[exploded addIndex:3];_pieChartView.explodedSlices = exploded;

Related Content


The following topics provide additional information related to this topic.



The topics in this group cover enabling, configuring, and using the IGPieChartView control’s supported features.