A Scatter chart with an offset X axis

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.scatter.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="200">
    [No canvas support]
</canvas>
This is the code that generates the chart:
<script>
    new RGraph.Scatter({
        id: 'cvs',
        data: [[15,11], [40,25],[38,23],[312,12],[160,15], [365, 8], [365, -8]],
        options: {
            backgroundGridAutofitNumhlines: 4,
            backgroundGridVlines: false,
            backgroundGridBorder: false,
            ylabelsCount: 4,
            defaultcolor: 'red',
            tickmarks: 'circle',
            ticksize: 5,
            gutterLeft: 25,
            boxplotWidth: 15,
            xmax: 365,
            labels: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
            ymin: -15,
            ymax: 45,
            boxplotCapped: false,
            numyticks: 4
        }
    }).draw();
</script>

« Back