# A 3D HBar chart with a center Y axis

This goes in the documents header:

    <script src="RGraph.common.core.js"></script>
    <script src="RGraph.common.dynamic.js"></script>
    <script src="RGraph.common.tooltips.js"></script>
    <script src="RGraph.hbar.js"></script>

Put this where you want the chart to show up:

    <canvas id="cvs" width="600" height="550">[No canvas support]</canvas>

This is the code that generates the chart:

    <script>
        new RGraph.HBar({
            id: 'cvs',
            data: [[1,null],[1,2],[5,4],[7,8],[4,3],[8,8],[4,6]],
            options: {
                textAccessible: true,
                colors: [
                    'Gradient(#fcc:red:red)',
                    'Gradient(#cfc:#0f0:#0f0)'
                ],
                grouping: 'grouped',
                yaxispos: 'left',
                scaleZerostart: true,
                variant: '3d',
                gutterLeft: 100,
                shadow: true,
                shadowOffsety:  5,
                shadowOffsetx: 13,
                shadowBlur: 10,
                shadowColor: '#aaa',
                vmargin: 10,
                noaxes: true,
                labels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
                tooltips: [
                    'Monday','Monday',
                    'Tuesday','Tuesday',
                    'Wednesday','Wednesday',
                    'Thursday','Thursday',
                    'Friday','Friday',
                    'Saturday','Saturday',
                    'Sunday','Sunday'
                ],
                tooltipsCoordsPage: true
            }
        }).draw();
    </script>

« Back