Plotsbands along x-axis in stacked column charts - Javascript highcharts

Javascript examples for highcharts:Column Chart

Description

Plotsbands along x-axis in stacked column charts

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://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
      <script type="text/javascript">
$(function () {/*from  w ww  . jav a2s. c  o  m*/
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        xAxis: {
            type:'datetime',dateTimeLabelFormats:{hour:'%l:%M %p'},
             plotBands: [{ // mark the weekend
                color: '#FCFFC5',
                from: 1372224600,
                to:1372224600
            }],
        },
        plotOptions: {
            series: {
                stacking: 'normal'
            }
        },
        series: [{
            data: [[1372224600,29.9]]
        }, {
            data: [[1372224600,144.0]]
        }]
    });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="container" style="height: 400px"></div>  
   </body>
</html>

Related Tutorials