EXAMPLE 15 Custom Waterfall Chart
Purpose: Create a waterfall chart in SAS/GRAPH, using the Annotate facility.
Waterfall charts provide a good way to visualize the cumulative effect of positive or negative data values sequentially added to a running total (such as a ledger or checkbook). A waterfall chart is similar to a line chart of the cumulative total, using the step interpolation.
As of SAS 9.2, SAS/GRAPH does not have a built-in easy way to produce waterfall charts, but as you might have guessed, you can create them fairly easily using a bit of custom programming.
Let’s start with some simple data for a small company. After reading in these values, we can calculate the total for the end of the year, and add that total as an extra ...