Highcharts Demo

author(s): Torstein Hønsi

by Hugo Carneiro

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'bar'
    },
    title: {
        text: null
    },
    subtitle: {
        text: null
    },
    xAxis: {
    		min: 0,
        categories: ['Kigali', 'Kampala', 'Johannesburg', 'Dar es Salaam', 'Nairobi'],
        title: {
            text: null
        },
        labels: {
            style: {
                height: 100
            }
        }
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Average cost (USD) per m<sup>2</sup>',
            align: 'high'
        },
        labels: {
            overflow: 'justify'
        }
    },
    tooltip: {
        valueSuffix: ' millions'
    },
    credits: false,
    plotOptions: {
        bar: {
            dataLabels: {
                enabled: true
            }
        },
        series: {
            pointWidth: 15
        }
    },
    legend: {
        enabled: false
    },
    credits: {
        enabled: false
    },
    series: [{
        name: 'Average cost (USD) per m<sup>2</sup>',
        data: [3487.82, 1058.99, 848.30, 803.52, 683.49],
        color: '#009fe3'
    }]
});