Previous Page | Next Page

The GCHART Procedure

Example 9: Ordering and Labeling Slices in a Pie Chart


Procedure features:

PIE statement options:

MIDPOINTS=

PERCENT=ARROW

SLICE=ARROW

VALUE=NONE

Other features:

GOPTIONS Statement option:

BORDER

Sample library member: GCHLABEL

[GCHLABEL-Ordering and labeling pie slices]

This example produces a pie chart of the types of vehicles produced worldwide. The labeled slices represent the percent of total production for each source. Instead of the sum statistic, each slice displays the percent each midpoint contributes to the whole pie. Arrows connect the midpoint labels to the slices, which are arranged by the MIDPOINTS= option so that similar types of vehicles are shown next to each other in the pie chart.

 Note about code
goptions reset=all border;
 Note about code
title "Types of Vehicles Produced Worldwide";
footnote j=r "GCHLABEL";
 Note about code
proc gchart data=sashelp.cars;
pie type / other=0
midpoints="Truck" "SUV" "Sedan" "Wagon" "Sports" "Hybrid"
value=none
percent=arrow
slice=arrow
noheading;
run;
quit; 

Previous Page | Next Page | Top of Page