Mathematica > Visualization and Graphics > Charting and Information Visualization >
Mathematica > Visualization and Graphics > Data Visualization > Charting and Information Visualization >

PieChart

PieChart[{y1, y2, ...}]
makes a pie chart with sector angle proportional to y1,y2,....
PieChart[{..., wi[yi, ...], ..., wj[yj, ...], ...}]
makes a pie chart with sector features defined by the symbolic wrappers wk.
PieChart[{data1, data2, ...}]
makes a pie chart from multiple datasets datai.
  • Data elements for PieChart can be given in the following forms:
yia pure sector value
wi[yi,...]a sector with value yi and wrapper wi
formi->mia sector form with metadata mi
  • Data not given in these forms is ignored in forming the pie chart.
  • Datasets for PieChart can be given in the following forms:
{e1,e2,...}list of elements with or without wrappers
w[{e1,e2,...},...]wrapper applied to a whole dataset
w[{data1,data1,...},...]wrapper applied to all datasets
  • The following wrappers can be used for chart elements:
Annotation[e,label]provide an annotation
Button[e,action]define an action to execute when the element is clicked
EventHandler[e,...]define a general event handler for the element
Hyperlink[e,uri]make the element act as a hyperlink
Labeled[e,...]display the element with labeling
Legended[e,...]include features of the element in a chart legend
Mouseover[e,over]make the element show a mouseover form
PopupWindow[e,cont]attach a popup window to the element
StatusArea[e,label]display in the status area when the element is moused over
Style[e,opts]show the element using the specified styles
Tooltip[e,label]attach an arbitrary tooltip to the element
"RadialOuter","RadialCenter","RadialInner"positions within sectors
"RadialOutside","RadialInside","RadialEdge"positions outside sectors
"RadialCallout"positions with callout lines
{{sTheta,sr},{lx,ly}}scaled position {lx, ly} in the label at scaled polar position {sTheta, sr} in the sector
  • PieChart has the same options as Graphics with the following additions and changes:
ChartBaseStyleAutomaticoverall style for sectors
ChartElementFunctionAutomatichow to generate raw graphics for sectors
ChartLabelsNonelabels for data elements and datasets
ChartLayoutAutomaticoverall layout to use
ChartLegendsNonelegends for data elements and datasets
ChartStyleAutomaticstyle for sector
ColorFunctionAutomatichow to color sectors
ColorFunctionScalingTruewhether to normalize arguments to ColorFunction
LabelingFunctionAutomatichow to label sectors
LegendAppearanceAutomaticoverall appearance of legends
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
PlotRangeAutomaticrange of values to include
PolarAxesFalsewhether to draw polar axes
PolarAxesOriginAutomaticwhere to draw polar axes
PolarGridLinesNonepolar gridlines to draw
PolarTicksAutomaticpolar axes ticks
SectorOriginAutomaticinitial angle and radius of sectors
SectorSpacingAutomaticspacing between sectors
  • Possible settings for ChartLayout include "Grouped" and "Stacked".
  • The arguments supplied to ChartElementFunction are the sector region {{Thetamin,Thetamax},{rmin,rmax}}, the values yi, and the metadata {m1, m2, ...} from each level in a nested list of datasets.
  • A list of built-in settings for ChartElementFunction can be obtained from ChartElementData["PieChart"].
Generate a pie chart for a list of values:
In[1]:=
Click for copyable input
Out[1]=
 
Generate a donut chart for a list of values:
In[1]:=
Click for copyable input
Out[1]=
 
Generate a pie chart for multiple datasets:
In[1]:=
Click for copyable input
Out[1]=
 
Use categorical labels:
In[1]:=
Click for copyable input
Out[1]=
Categorical legends:
In[2]:=
Click for copyable input
Out[2]=
 
Set the style for sectors:
In[1]:=
Click for copyable input
Out[1]=
Use procedural sectors:
In[2]:=
Click for copyable input
Out[2]=
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team