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

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

Note that this example is included in the book SAS/Graph: Beyond the Basics,
and all the 'tricks' used to create it are described in great detail!

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

Currently (v9.2) there is not a SAS/Graph proc to create waterfall charts.
(There's a WRS waterfall chart, but not one in SAS/Graph.)

So, here's a way to "fake it" using gchart to draw the axes, 
and annotate to draw the waterfall bar segments & connecting lines.
The annotate in this example makes particular use of various different
xsys & ysys coordinate systems ... in particular the "relative" ones.
(If you try to modify the code, you'll want to pay special attention,
and fully understand those xsys/ysys variables!)

Hopefully this is pretty well generalized code, and will be easy
for you to re-use with your data.

Note that the final bar segment is calculated for you automatically,
so you don't need to put that value in your data set.

Back to Samples Index