Contents Previous Next

8.2.3 Exploding pie slices

One way to attract attention to some specific piece of information in a pie chart is to "explode" one or more slices. Both 2D and 3D pies support exploding one or several slices.

Exploding slices is accomplished by the methods Explode() and ExplodeSlice() The first method is used if you want to explode more than one slices and the second is a shorthand to make it easy to just explode one slice.

For example to explode one slice the default "explode" radius you would just have to say

 $pieplot->ExplodeSlice( 1)

The above line would explode the second slice (slices are numbered from 0 and upwards) the default amount. Doing this to the two previous example would result in



Figure 129: Exploding one slice [src] 



Figure 130: Exploding one 3D slice [src] 

To explode all slices at once you can use the PiePlot::ExplodeAll() method. If you want to explode several slices you can use the PiePlot::Explode() method and supply a suitable array argument.


Contents Previous Next