Ageing in India - Column

Describes ageing in India over the years

by Darth Vader

HTML

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

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

JavaScript

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Ageing in India'
        },
        subtitle: {
            text: 'Source: Office of the Regisrar General & Census Commissioner, India'
        },
        credits: {
        	enabled: false
        },
        xAxis: {
            categories: [
                '1901',
                '1911',
                '1921',
                '1931',
                '1941',
                '1951',
                '1961',
                '1971',
                '1981',
                '1991',
                '2001',
            ],
            crosshair: true
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Population (millions)'
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            column: {
                pointPadding: 0.2,
                borderWidth: 0
            }
        },
        series: [{
            name: 'Females',
            data: [6.56, 6.99,7.00,7.27,9.15,9.94,12.35,15.83,21.43,27.07,37.71]

        }, {
            name: 'Males',
            data: [5.50,6.18,6.48,6.94,8.89,9.67,12.36,16.87,22.49,28.23,38.22]

        }]
    });
});