Procedure features: |
PIE statement options:
|
PIE3D statement options:
|
|
Other features: |
GOPTIONS statement option:
|
FORMAT statement |
RUN-group processing |
|
Sample library member: |
GCHPISUM
|
![[GCHPISUM-Specifying the SUM statistic for a PIE chart]](images/gchpisuma.gif)
This
example produces two pie charts that show total
sales for three sites by charting the values of the character variable SITE
and calculating the sum of the variable SALES for each site. It represents
the statistics as slices of the pie. By default, the midpoint value and the
summary statistic are printed beside each slice.
The pie slices use the default pattern fill, which is
solid. Each slice displays a different color because, by default, pie charts
are patterned by midpoint.
The second pie chart is a three-dimensional pie chart
with an exploded slice, as shown in the following
output.
![[GCHPISUM-3D Pie showing SUM statistic]](images/gchpisumb.gif)
 |
goptions reset=all border; |
 |
data totals;
length dept $ 7 site $ 8;
input dept site quarter sales;
datalines;
Parts Sydney 1 7043.97
Parts Atlanta 1 8225.26
Parts Paris 1 5543.97
Tools Sydney 4 1775.74
Tools Atlanta 4 3424.19
Tools Paris 4 6914.25
; |
 |
title "Total Sales";
footnote j=r "GCHPISUM(a) "; |
 |
proc gchart data=totals;
format sales dollar8.;
pie site / sumvar=sales;
run; |
 |
footnote j=r "GCHPISUM(b)"; |
 |
pie3d site / sumvar=sales
explode="Paris";
run;
quit; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.