Forcing x-axis to display all the days within the zoom - Javascript highcharts

Javascript examples for highcharts:Chart Axis

Description

Forcing x-axis to display all the days within the zoom

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Stock 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. ja v  a 2 s . c  o  m
   $('#container').highcharts('StockChart', {
      title: {
      },
       xAxis: {
          tickInterval: 24 * 3600 * 1000
       },
       series: [{
           name: 'USD to EUR',
            data: [[Date.UTC(2012,6,6),4], [Date.UTC(2012,6,8),7], [Date.UTC(2012,6,10),5]]
       }]
   });
});

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

Related Tutorials