heatmap creation - Javascript highcharts

Javascript examples for highcharts:Heatmap Chart

Description

heatmap creation

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>heatmap grid</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {//w  w w  . j a  v  a 2s.c  o  m
    $('#container').highcharts({
        chart: {
            type: 'heatmap'
        },
        title: { text: '' },
        legend: { enabled: false },
        credits: { enabled: false },
        xAxis: {
            title: { text: '' },
            labels: { enabled: false }
        },
        yAxis: {
            title: { text: '' },
            labels: { enabled: false }
        },
        series: [{
            borderWidth: 1,
            borderColor:'rgba(255,255,255,.9)',
            data: [
                {x:0, y:2, value:1, title:'A'},
                {x:1, y:2, value:1, title:'B'},
                {x:2, y:2, value:1, title:'C'},
                {x:0, y:1, value:1, title:'D'},
                {x:1, y:1, value:1, title:'E'},
                {x:2, y:1, value:1, title:'F'},
                {x:0, y:0, value:1, title:'G'},
                {x:1, y:0, value:1, title:'H'},
                {x:2, y:0, value:1, title:'I'},
            ],
            dataLabels: {
                enabled: true,
                color: '#000000',
                formatter: function () {
                    return this.point.title;
                }
            }
        }]
    });
});

      </script> 
   </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/exporting.js"></script> 
      <div id="container" style="height: 400px; min-width: 310px; max-width: 800px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials