Procedure features: |
HBAR statement options:
|
VBAR3D statement options:
|
|
Other features: |
FORMAT statement |
GOPTIONS statement option:
|
RUN-group processing |
|
Sample library
member: |
GCHBRSUM
|
![[GCHBRSUM(a)-Horizontal Bar chart with SUM statistic]](images/gchbrsum.gif)
This
example produces two bar charts that show the 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.
In the horizontal bar chart shown above, the summary
statistics are printed by default to the right of the bars and display the
formatted values of SALES.
The output also shows the frame that is drawn by default
around the axis area.
The second bar chart is a three-dimensional vertical
bar chart, shown in the following output. Vertical bar charts do not generate
a table of statistics and by default do not print any chart
statistics.
![[GCHBRSUM(b)-Vertical bar chart with SUM statistic]](images/gchbrsumb.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
; |
 |
title1 "Total Sales";
footnote1 j=r "GCHBRSUM(a)"; |
 |
proc gchart data=totals;
format sales dollar8.;
hbar site / sumvar=sales;
run; |
 |
vbar3d site / sumvar=sales;
footnote1 j=r "GCHBRSUM(b)";
run;
quit; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.