Click here to see the SAS code.
Click here to see the example.
This is a simple sas/graph gchart 'hbar' (horizontal bar) chart,
with a few little tricks at work...
To sort the bars in the exact order I want, I use the 'midpoints'
option in the 'proc gchart' and specify all the long text
of the bar labels (midpoints) -- this controls the order and
is much easier than using numeric values and then applying a
user-defined format (which is another way of ordering the bars
in the desired order).
I do a user-defined format for the percent axis - the real
percent format does negative %'s with ()'s around them, but I
wanted it to show up with a '-' instead.
I also create an annotate data set so I can annotate the numbers
on the bars, and for the bars that extend outside the axis range
(ie, > 50%) I annotate an arrowhead on the end of the bar (using
the 'B' character of the sas/graph 'marker' software font).
Back to Samples Index