An SVG filled accumulative Line chart

This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.line.js"></script>
Put this where you want the chart to show up:
<div style="width: 750px; height: 300px" id="chart-container"></div>
This is the code that generates the chart:
<script>
    new RGraph.SVG.Line({
        id: 'chart-container',
        data: [
            8,6,12,13,15,16,12,
            12,16,18,19,24,23,21,
            26,25,27,31,29,33,34,
            36,32,37,35,38,39,40,
            39,42,41,43,45,48,49 
        ],
        options: {
            hmargin: 0,
            gutterLeft: 50,
            gutterRight: 35,
            gutterBottom: 50,
            yaxisDecimals: 2,
            linewidth: 3,
            backgroundGridVlinesCount: 7,
            filled: true,
            filledColors: ['rgba(255,128,128,0.25)'],
            filledClick: function (e)
            {
                $a('The fill has been clicked!');
            },
            xaxisLabelsPosition : 'section',
            xaxisLabels: [
                '','Monday','',
                '','Tuesday','',
                '','Wednesday','',
                '','Thursday','',
                '','Friday','',
                '','Saturday','',
                '','Sunday',''
            ],
            title: 'An accumulative filled Line chart'
        }
    }).draw();
</script>

« Back