Highcharts Religion Bar DrillDown

Nayana Das

by Nayana Das

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.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 () {

    // Create the chart
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Basic drilldown'
        },
        xAxis: {
            type: 'category'
        },
				exporting:{
        		enabled:true
        },
        legend: {
            enabled: false
        },

        plotOptions: {
            series: {
                borderWidth: 0,
                dataLabels: {
                    enabled: true
                }
            }
        },

        series: [{
            name: 'Religion',
            colorByPoint: true,
            data: [{
                name: 'Hindu',
                y: 60,
                drilldown: 'hindu'
            }, {
                name: 'Muslim',
                y: 2,
                drilldown: 'muslim'
            }, {
                name: 'Christian',
                y: 3,
                drilldown: 'christian'
            }]
        }],
        drilldown: {
            series: [{
                id: 'hindu',
                data: [
                    ['SOLIZHYA VELLALAR', 1],
                    ['NAIBRAHMIN', 1],
                    ['ADI DRAVIDA', 1],
                    ['Vishwakarma', 1],
                    ['REDDIAR', 1],
                    ['Thiyya', 3],
                    ['Ezhava', 15],
                    ['Nambiar', 2],
                    ['BRAHMIIN', 3],
                    ['Nair', 23],
                    ['Dheevara', 1],
                    ['VILAKKITHALA NAIR', 1],
                    ['Pillai', 1],
                    ['NAIR (MENON)', 1],
                    ['MOOTHAN', 1],
                    ['Vannar', 1],
                    ['PERUMANNAN', 1],
                    ['Warrier', 1]
                ]
            }, {
                id: 'muslim',
                data: [
                    ['muslim', 1],
                    ['ISLAM', 1]
                ]
            }, {
                id: 'christian',
            ...