Highcharts Demo

author(s): Torstein Hønsi

by Black Label

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container"></div>

CSS

#container {
  min-width: 310px;
  max-width: 800px;
  height: 400px;
  margin: 0 auto
}

JavaScript

(function(H) {
  H.wrap(H.Pointer.prototype, 'getHoverData', function(proceed, existingHoverPoint, existingHoverSeries, series, isDirectTouch, shared, e) {

    var result = proceed.apply(this, Array.prototype.slice.call(arguments, 1));

    if (result.hoverPoint) {
      result.hoverPoint.originalEvent = e;
    }

    return result;
  });
}(Highcharts));

Highcharts.chart('container', {
  series: [{
    name: 'Installation',
    data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
    point: {
      events: {
        mouseOver: function(e) {
          console.log(this.originalEvent.pageX);
        }
      }
    }
  }]
});