identify stock charts data group event? - Javascript highcharts

Javascript examples for highcharts:Stock Chart

Description

identify stock charts data group event?

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/stock/highstock.src.js"></script> 
      <div id="container"></div> 
      <script type="text/javascript">
 (function(H) {// www  . j a  v  a 2s . c  o m
   H.wrap(H.Series.prototype, 'generatePoints', function(proceed) {
     proceed.call(this);
     console.log('Data grouping applied: ' + (this.hasGroupedData === true));
   });
 })(Highcharts);
 var day = 24 * 3600 * 1000,
   start = Date.UTC(2017, 0, 1);
 var chart = Highcharts.stockChart('container', {
   xAxis: {
     minRange: 1
   },
   series: [{
     pointStart: start,
     pointInterval: day,
     data: [3, 4, 1],
     dataGrouping: {
       //forced: true,
       units: [
         ['year', [1]]
       ]
     }
   }]
 });

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

Related Tutorials