# A Bar chart showing the new default colors

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="600" height="250">
        [No canvas support]
    </canvas>

This is the code that generates the chart:

    <script>
        window.onload = function ()
        {
            var bar = new RGraph.Bar({
                id: 'cvs',
                data: [[4,8,6,5,3,8],[1,2,3,4,5,6],[8,4,6,3,5,4],[8,4,3,2,5,8],[4,8,6,5,3,5]],
                options: {
                    labels: ['Monday','Tuesday','Wednesday','Thursday','Friday'],
                    hmargin: 25,
                    hmarginGrouped: 3,
                    backgroundGridAutofitNumvlines: 5,
                    shadowOffsetx: 2,
                    shadowOffsety: 2,
                    shadowBlur: 2,
                    textAccessible: true
                }
            }).draw();
        };
    </script>

« Back