zoom xAxis and pan along axis in line chart - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

zoom xAxis and pan along axis in line 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"> 
      <style id="compiled-css" type="text/css">

#container {//ww  w  .  ja v a 2 s  .c om
   min-width: 310px;
   max-width: 800px;
   height: 400px;
   margin: 0 auto
}


      </style> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/stock/highstock.js"></script> 
      <div id="container"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
  chart: {
    zoomType: 'x'
  },
  series: [{
    data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
  }],
  scrollbar: {
    enabled: true
  }
});

      </script>  
   </body>
</html>

Related Tutorials