Highcharts Demo

author(s): Torstein Hønsi Ismail S

by ismusidhu

HTML

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

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

JavaScript

$(function() {
  var data = [{
    x: Date.UTC(2006, 0, 1),
    y: 42,
    href: 'foo'
  }, {
    x: Date.UTC(2006, 0, 2),
    y: 53,
    href: 'bar'
  }, {
    x: Date.UTC(2006, 0, 3),
    y: 64,
    href: 'baz'
  }];

  $('#container').highcharts({
    xAxis: {
      type: 'datetime'
    },

    plotOptions: {
      series: {
        events: {
          click: function(event) {
            console.log(event.point.options.href);
          }
        }
      }
    },

    series: [{
      data: data,
      isGraphEnabled: false
    }]
  });
});