A basic Bar chart

[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:
<div style="padding: 15px">
    <canvas id="cvs" width="750" height="250">[No canvas support]</canvas>
This is the code that generates the chart:
    new RGraph.Bar({
        id: 'cvs',
        data: [12,18,10,9,6,20,18],
        options: {
            labels: ['Monday\n(urgh!)','Tuesday','Wednesday','Thursday','Friday\n(yay!)','Saturday','Sunday'],
            unitsPost: 'k',
            shadow: false,
            colors: ['red'],
            strokestyle: 'rgba(0,0,0,0)',
            textSize: 14,
            //textAccessible: true, // Defaults to true now
            title: 'A basic Bar chart using DOM text',
            numyticks: 5,
            noxaxis: true,
            gutterLeft: 50,
            scaleZerostart: true

Share on Facebook Share on Twitter

« Back