Chapter Contents |
Previous |
Next |
The GCHART Procedure |
Procedure features: |
| |||||||||||||||
Other features: | LEGEND statement | |||||||||||||||
Data set: | TOTALS | |||||||||||||||
Sample library member: | GR13N09 |
This example produces a donut chart that is similar to the pie chart in Specifying the Sum Statistic for a Pie Chart in that each slice represents total sales for a site and each slice is a different color. However, in this donut chart the sites are subgrouped by department, so that each department is represented as a concentric ring with slices.
Subgrouping suppresses the chart statistic and the midpoint labels. Instead it automatically labels the rings with the subgroup values and generates a legend that shows how the patterns are associated with the midpoint values. Subgrouping a pie chart produces the same results but without the hole in the center.
To allow the donut chart to be as large as possible, the program suppresses the default heading and moves the legend into the space at the left of the chart.
libname reflib 'SAS-data-library'; goptions reset=global gunit=pct border cback=white colors=(blue green red) ctext=black ftext=swissb ftext=swiss htitle=6 htext=4; |
title 'Sales by Site and Department'; footnote h=3 j=r 'GR13N09 '; |
legend1 label=none shape=bar(4,4) position=(middle left) offset=(5,) across=1 mode=share; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.