Highcharts Demo

author(s): Torstein Hønsi

by Ratan Paul

HTML

<script src="http://github.highcharts.com/highcharts.js"></script>
<script src="http://github.highcharts.com/modules/drilldown.js"></script>

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

JavaScript

$(function () {    

    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Basic drilldown'
        },
        xAxis: {
            type: 'category'
        },

        legend: {
            enabled: true
        },

        plotOptions: {
            series: {
                borderWidth: 0,
                dataLabels: {
                    enabled: true,
                    style: {
                        color: 'white',
                        textShadow: '0 0 2px black, 0 0 2px black'
                    }
                },
                stacking: 'normal'
            }
        },

        series: [{
            name: 'User 1',
            data: [{
                name: 'Jan',
                y: 5,
                drilldown: 'User1_Jan'
            }, {
                name: 'Feb',
                y: 2,
                drilldown: 'User1_Feb'
            }, {
                name: 'Mar',
                y: 3,
                drilldown: 'User1_Mar'
            },{
                name: 'Apr',
                y: 2,
                drilldown: 'User1_Apr'
            }]
        }, {
            name: 'User 2',
            data: [{
                name: 'Jan',
                y: 1,
                drilldown: 'User2_Jan'
            }, {
                name: 'Feb',
                y: 2,
                drilldown: 'User2_Feb'
            }, {
                name: 'Mar',
                y: 3,
                drilldown: 'User2_Mar'
            },{
                name: 'Apr',
                y: 6,
                drilldown: 'User2_Apr'
            }]
        }],
        drilldown: {
            activeDataLabelStyle: {
                color: 'white',
                textShadow: '0 0 2px black, 0 0 2px black'
            },
            series: [{
                id: 'User1_Jan',
                name: 'User1_Jan',
                data: [
                    ['Jan 03', 1],
                    ['Jan...