Create XY ZOOM for line chart - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

Create XY ZOOM for 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"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.src.js"></script> 
      <script src="https://code.highcharts.com/highcharts-more.src.js"></script> 
      <script src="https://code.highcharts.com/modules/annotations.src.js"></script> 
      <div id="container"></div> 
      <script type="text/javascript">
var chart = Highcharts.chart('container', {
   chart: {//from  w  w w . j a  va  2 s  .c  o  m
     zoomType: 'xy'
  },
  series: [{
     groupPadding: false,
    pointPadding: 0,
    borderRadius: 10,
    showInLegend: false,
    borderColor: 'red',
    borderWidth: 2,
    color: 'none',
    type: 'columnrange',
    pointRange: 4,
    data: [{
      x: 3,
      low: 1,
      high: 24,
    }]
  }, {
    data: [12, 3, 4, 5, 44]
  }]
});

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

Related Tutorials