Pie Chart

Author

Eric W. Weisstein
January 25, 2011

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Graphics/PieChart.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PieChart.html.

©2010 Wolfram Research, Inc. except for portions noted otherwise

Example

V5

<<Graphics`Graphics`

Show[GraphicsArray[{
			PieChart[{1.1,2.4,2.2,1.4,2.5,3.6},DisplayFunction->Identity],
			PieChart[{1.1,2.4,2.2,1.4,2.5,3.6},DisplayFunction->Identity,PieExploded->{1,2}]
		}]]

V6

With[{data={1.1,2.4,2.2,1.4,2.5,3.6}},GraphicsRow[{
PieChart[data,ChartLabels->Range[6]],
PieChart[data,ChartLabels->Range[6],SectorSpacing->{.1,Automatic}]
}]]

With[{data={1.1,2.4,2.2,1.4,2.5,3.6}},GraphicsRow[{
PieChart[data,ChartLabels->Range[6],PerformanceGoal->"Speed"],
PieChart[{1.1,2.4,Charting`Tweaked[2.2,{"Popout",0.2}],Charting`Tweaked[1.4,{"Popout",0.2}],2.5,3.6},ChartLabels->Range[6]]
}]]

Bug:

With[{data={1.1,2.4,2.2,1.4,2.5,3.6}},GraphicsRow[{
p1=PieChart[data,ChartLabels->Range[6],PerformanceGoal->"Speed"],
p2=PieChart[{1.1,2.4,Charting`Tweaked[2.2,{"Popout",0.2}],Charting`Tweaked[1.4,{"Popout",0.2}],2.5,3.6},ChartLabels->Range[6],PerformanceGoal->"Speed"]
}]]

Workaround:

Popout[{{t0_,t1_},{r0_,r1_}},a_,b_]:=Block[{sector,popout},sector=ChartElementData["Sector"][{{t0,t1},{r0,r1}},a,b];
popout=Cases[b,{"Popout",_}];
If[Length[popout]>0,popout=Last[First[popout]];
Translate[sector,popout*{Cos[(t0+t1)/2],Sin[(t0+t1)/2]}],sector]]

p2=PieChart[{1.1,2.4,2.2->{"Popout",0.2},1.4->{"Popout",0.2},2.5,3.6},ChartLabels->Range[6],PerformanceGoal->"Speed",ChartElementFunction->Popout]

GraphicsRow[{p1,p2}]

p1//InputForm