# An HBar chart with labelsAbove

This goes in the documents header:

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

Put this where you want the chart to show up:

    <canvas id="cvs" width="700" height="450">
        [No canvas support]
    </canvas>

This is the code that generates the chart:

    <script>
        new RGraph.HBar({
            id: 'cvs',
            data: [5.06,8.23,6.48,4,3.66,2.84,1.12,6.45,8.11],
            options: {
                labels: ['Arial','Francine-Jane','Fred','Kev','Lou','Doug','Jim','Rachel','Jone'],
                gutterLeftAutosize: true,
                colors: ['Gradient(#009:#00f:#00f)'],
                textSize: 14,
                textAccessiblePointerevents: true,
                noaxes: true,
                backgroundGridHlines: false,
                backgroundGridBorder: false,
                labelsAbove: true,
                labelsAboveDecimals: 2,
                labelsAboveUnitsPost: 'Kg',
                labelsAboveColor: '#999',
                labelsAboveBold: true,
                labelsAboveItalic: true
            }
        }).wave();
    </script>

« Back