An SVG HBar chart showing the annual revenue for Star Tech

If you like RGraph please share it:

This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.hbar.js"></script>
Put this where you want the chart to show up:
    div#chart-container {
        width: 650px;
        height: 300px;
        display: inline-block;
        background-image: linear-gradient(45deg, #000049,#0000CB);
        border-bottom-right-radius: 25px;
        border-top-left-radius: 25px;

<div id="chart-container"></div>
This is the code that generates the chart:
    new RGraph.SVG.HBar({
        id: 'chart-container',
        data: [2650, 2300, 1950, 1600, 1350],
        options: {
            data: [2650, 2300, 1950, 1600, 1350],
            options: {
            yaxisLabels: ['2005','2004', '2003', '2002','2001'],
            yaxisColor: 'white',
            yaxisTickmarks: null,
            xaxis: false,
            backgroundGridHlines: false,
            backgroundGridBorder: false,
            backgroundGridColor: 'white',
            title: 'Annual revenue for Star Tech',
            titleColor: 'white',
            textColor: 'white',
            textSize: 8,
            textFont: 'sans-serif',
            colors: [
            colorsSequential: true,
            labelsAbove: true,
            attributionX: '-50',
            attributionSize: 6,
            attributionColor: 'white',
            xaxisUnitsPre: '$',
            xaxisUnitsPost: 'm'

« Back