Highcharts Demo

author(s): Torstein Hønsi

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/drilldown.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',
            events: {
                drilldown: function (e) {
                    if (!e.seriesOptions) {
                        var chart = this,
                            drilldowns = {
                                'Animals': {
                                    name: 'Animals',
                                    data: [
                                        ['Cows', 2],
                                        ['Sheep', 3]
                                    ]
                                },
                                    'Animals2': {
                                    name: 'Animals',
                                    color: Highcharts.getOptions().colors[1],
                                    data: [
                                        ['Cows', 22],
                                        ['Sheep', 13]
                                    ]
                                },
                                    'Fruits': {
                                    name: 'Fruits',
                                    data: [
                                        ['Apples', 5],
                                        ['Oranges', 7],
                                        ['Bananas', 2]
                                    ]
                                },
                                    'Fruits2': {
                                    name: 'Fruits',
                                    color: 'red',
                                    data: [
                                        ['Apples', 15],
                                        ['Oranges', 17],
                                        ['Bananas', 22]
                                    ]
                                },
                                    'Cars': {
                                    name: 'Cars',
                                    data:...