score:1

This data structure doesn't is quite messy, but I assumed that you cannot change it. Try to use this solution:

events: {
  drilldown: function(e) {
    console.log(e.point.name)
    if (!e.seriesOptions) {

      var chart = this,
        drilldowns = {
          'Bob': {
            name: 'Low',
            color: '#3150b4',
            data: [{
              name: data.clus[0]['top_level'][0].name,
              y: data.clus[0]['top_level'][0].amount.low,
              drilldown: true
            }]
          },
          'Andy': {
            name: 'Low',
            color: '#3150b4',
            data: [{
              name: data.clus[0]['top_level'][0]['low_level'][0].name,
              y: data.clus[0]['top_level'][0]['low_level'][0].amount.low,
              drilldown: true
            }]
          }
        },
        drilldowns2 = {
          'Bob': {
            name: 'Sweet',
            color: '#50B432',
            data: [{
              name: data.clus[0]['top_level'][0].name,
              y: data.clus[0]['top_level'][0].amount.sweet,
              drilldown: true
            }]
          },
          'Andy': {
            name: 'Sweet',
            color: '#50B432',
            data: [{
              name: data.clus[0]['top_level'][0]['low_level'][0].name,
              y: data.clus[0]['top_level'][0]['low_level'][0].amount.sweet,
              drilldown: true
            }]
          }
        },
        series = drilldowns[e.point.name],
        series2 = drilldowns2[e.point.name];
      chart.addSingleSeriesAsDrilldown(e.point, series);
      chart.addSingleSeriesAsDrilldown(e.point, series2);
      chart.applyDrilldown();

    }
  }
}

Demo: https://jsfiddle.net/BlackLabel/pk36xrb0/


Related Articles