highcharts to fill the width - Javascript highcharts

Javascript examples for highcharts:Width

Description

highcharts to fill the width

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <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  .j a va2 s .c  o  m*/
    $('#container').highcharts('StockChart', {
        rangeSelector : {
            selected : 1
        },
        title : {
            text : 'AAPL Stock Price'
        },
        xAxis: {
            min: 1420070400000,
            max: 1420070400000 + 86400000
        },
        yAxis: {
            min: 0,
            max: 10
        },
        series : [{
            name : 'AAPL',
            data : [[1420070400000, 3], [1420070460000, 7]],
            tooltip: {
                valueDecimals: 2
            }
        }]
    });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/stock/highstock.js"></script> 
      <script src="https://code.highcharts.com/stock/modules/exporting.js"></script> 
      <div id="container" style="height: 400px; min-width: 310px"></div>  
   </body>
</html>

Related Tutorials