The Waterfall chart now supports having an offset X axis instead of it just being in the center or at the bottom.
This goes in the documents header:<script src="RGraph.common.core.js"></script> <script src="RGraph.waterfall.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="700" height="450" >
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
new RGraph.Waterfall({
id: 'cvs',
data: [5,4,11,-30,4,5,3],
options: {
ylabelsCount: 6,
backgroundGridAutofitNumhlines: 6,
ymin: -10,
ymax: 20,
labels: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun',''],
gutterLeft: 50,
scaleDecimals: 2,
unitsPre: '$',
backgroundGridBorder: false,
backgroundGridVlines: false
}
}).draw();
</script>