Highcharts Drilldown on Drilldown

author(s): Jefferson Salunga

by gokulmaha

HTML

<script src="http://github.highcharts.com/master/highcharts.js"></script>
<script src="http://github.highcharts.com/master/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'
                },
                title: {
                    text: 'Basic drilldown'
                },
                xAxis: {
                    type: 'category'
                },

                legend: {
                    enabled: false
                },

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

                series: [{
                    name: 'Commodity',
                    colorByPoint: true,
                    data: [{
                        name: 'Display',
                        y: 7279310,
                        drilldown: 'Display'
                    },
                    {
                        name: 'Electrical',
                        y: 2173140,
                        drilldown: 'Electrical'
                    }]
                }],
                drilldown: {
                    series: [
                      {
                          "id": "Electrical",
                          "name": "Electrical",
                          "data": [
                            {
                                "name": "Electronic Discrete Components",
                                "y": 2173140,
                                "drilldown": "Electronic Discrete Components"
                            }
                          ]
                      },
            {
                "id": "Electronic Discrete Components",
                "data": [
                  {
                      "name": "Capacitors",
                      "y": 1071560,
                      "drilldown": "Capacitors"
                  },
                  {
                      "name": "Diodes",
      ...