display dates in heat map chart - Javascript highcharts

Javascript examples for highcharts:Heatmap Chart

Description

display dates in heat map 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"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {//from  ww  w . java2  s .  co m
    $('#container').highcharts({
        chart: {
            type: 'heatmap'
        },
        xAxis: {
            type: 'category'
        },
        yAxis: {
            type: 'datetime',
            dateTimeLabelFormats: {
                day: '%A'
            }
        },
        legend: {
            enabled: false
        },
        series: [{
            rowsize: 3600000, // one hour
            data: [{
                x: 0,
                y: 1401292253000,
                value: 0.2,
                name: "a"
            }, {
                x: 1,
                y: 1401173762000,
                value: 0.3,
                name: "b"
            }, {
                x: 2,
                y: 1401173462000,
                value: 0.6,
                name: "c"
            }]
        }]
    });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/modules/heatmap.js"></script> 
      <div id="container" style="height: 400px; width: 400px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials