implement drilldown for heatmap chart - Javascript highcharts

Javascript examples for highcharts:Chart Drilldown

Description

implement drilldown for heatmap chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/modules/heatmap.js"></script> 
      <script src="https://code.highcharts.com/modules/drilldown.js"></script> 
      <div id="container" style="height: 400px; min-width: 310px; max-width: 800px; margin: 0 auto"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
    chart: {//w w w  . ja v a 2s. c o  m
        type: 'heatmap'
    },
    colorAxis: {
        min: 0,
        minColor: '#FFFFFF',
        maxColor: Highcharts.getOptions().colors[0]
    },
    series: [{
        data: [{
            x: 0,
            y: 0,
            value: 10,
            drilldown: 'animals'
        }, {
            x: 0,
            y: 0,
            value: 10
        }, {
            x: 0,
            y: 1,
            value: 19
        }, {
            x: 1,
            y: 0,
            value: 92
        }, {
            x: 1,
            y: 1,
            value: 58
        }],
        dataLabels: {
            enabled: true,
            color: '#000000'
        }
    }],
    drilldown: {
        series: [{
            id: 'animals',
            data: [
                [0, 9, 7],
                [1, 10, 4],
                [2, 6, 3]
            ]
        }]
    }
});

      </script>  
   </body>
</html>

Related Tutorials