Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------

Since "proc gbarline" doesn't support stacked/segmented bar charts (until v9.2),
this example shows how to use "proc gchart" to do the stacked/segmented
bar, and annotate the line & annotate the line axis on the right-side
of the graph.

I have tried to generalize the code somewhat, so that you can easily
change the dataset name, and variables to plot, using the macro variables 
at the top of the sas job.

Some of the key things here are that when you annotate onto a bar chart,
you use 'midpoint' instead of 'x', and when I calculate the y-values
for the annotate I do that as a %-age from zero to the max y-value
(and then use the annotate ysys='1' coordinate system).

-----

When v9.2 ships, here is how you can do this same chart, with much
simpler code, using "proc gbarline".

Click here to see the SAS code.
Click here to see the example.

-----

Back to Samples Index