Chapter Contents |
Previous |
Next |
The GCHART Procedure |
Procedure features: |
| |||||||||||||||||||
Other features: |
| |||||||||||||||||||
Data set: | TOTALS | |||||||||||||||||||
Sample library member: | GR13N04 |
This example subgroups by department the 3D vertical bar chart of total sales for each site that is shown in Specifying the Sum Statistic in Bar Charts. In addition to subdividing the bars to show the amount of sales for each department for each site, the chart displays statistics both inside and outside of the bars. OUTSIDE=SUM prints the total sales for the site above each bar. INSIDE=SUBPCT prints the percent each department contributed to the total sales for its site inside of each subgroup segment.
The legend has a block-effect shadow whose color matches the backplane. The graphics option OFFSHADOW= defines the size and position of the block shadow. Both the LEGEND statement and the AXIS statement use the ORIGIN= option to line up the legend and the chart by explicitly positioning their lower left corners.
libname reflib 'SAS-data-library'; goptions reset=global gunit=pct border cback=white colors=(black red green blue) ftitle=swissb ftext=swiss htitle=6 htext=4 offshadow=(1.5,1.5); |
title1 'Total Sales by Site'; footnote1 h=3 j=r 'GR13N04 '; |
axis1 label=none origin=(24,); |
axis2 label=none order=(0 to 100000 by 20000) minor=(number=1) offset=(,0); |
legend1 label=none shape=bar(3,3) cborder=black cblock=gray origin=(24,); |
pattern1 color=lipk; pattern2 color=cyan; pattern3 color=lime; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.