Previous Page | Next Page

The GCHART Procedure

Example 10: Grouping and Arranging Pie Charts


Procedure features:

PIE statement options:

ACROSS=

CLOCKWISE

GROUP=

OTHER=

PERCENT=OUTSIDE

SLICE=OUTSIDE

Other features:

GOPTIONS statement option:

BORDER

Sample library member: GCHPIGRP

[GCHPIGRP-Grouping and arranging pie charts]

This example produces two pie charts that show the production of trucks worldwide. Both charts are displayed on one page and are arranged two across. The program uses the CLOCKWISE option to arrange the slices, which begin at the 12 o'clock position and proceed clockwise in alphabetic order of the midpoint.

The chart statistic is suppressed and the midpoint label and the percent of the chart statistic are displayed outside of the slice.

 Note about code
goptions reset=all border;
 Note about code
title "Types of Trucks Produced Worldwide";
footnote j=r "GCHPIGRP"; 
 Note about code
proc gchart data=sashelp.cars(where=(type="SUV" or type="Truck"));
  pie make / group=type 
             across=2
             other=5 otherlabel="Other Makes"
             clockwise value=none
             slice=outside percent=outside;
run;
quit; 

Previous Page | Next Page | Top of Page