# A basic SVG Waterfall chart

A demo of a simple waterfall chart. This Waterfall chart shows decling data and has a total column half way through the data too. It also has a key so you can label the differences between up and down columns. There's also a total column at the end which is optional (but is the default).

This goes in the documents header:

    <script src="RGraph.svg.common.core.js"></script>
    <script src="RGraph.svg.waterfall.js"></script>

Put this where you want the chart to show up:

    <div style="width: 900px; height: 300px" id="chart-container"></div>

This is the code that generates the chart:

    <script>
        new RGraph.SVG.Waterfall({
            id: 'chart-container',
            data: [100,-5,-9,-8,null,-4,-26,-27],
            options: {
                xaxisLabels: ['Start', 'Monday','Tuesday','Wednesday','Midweek','Thursday','Friday','Saturday','Result'],
                tooltips: ['Start', 'Monday','Tuesday','Wednesday','Midweek','Thursday','Friday','Saturday','Result: 79 sold, 21 remaining'],
                backgroundGridDashed: true
            }
        }).draw();
    </script>