A Bar chart with errorbars

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="700" height="250">
    [No canvas support]
This is the code that generates the chart:
    var bar = new RGraph.Bar({
        id: 'cvs',
        data: [12,18,10,9,6,20,18],
        options: {
            labels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
            shadow: false,
            colors: ['red'],
            strokestyle: 'rgba(0,0,0,0)',
            textAccessible: true,
            errorbars: [
                [7,4, 'blue'],
            //errorbarsLinewidth: 2,
            //errorbarsColor: 'gray',
            //errorbarsCapped: false,
            //errorbarsCappedWidth: 14 // This is the default

Share on Facebook Share on Twitter

« Back