score:8

Accepted answer

You should look at this: http://api.highcharts.com/highcharts#series.data

If you specify each point as an object, you can add any property you want to each point and access it in your tooltip formatter through this.point.

With the data as currently formatted

var seriesArr = [];
$.each(jdata, function(key, data) {
  var series = {name : key, data : []};

  $.each(data.y, function(index, value) {
    series.data.push({y: value });
  });

  $.each(data.n, function(index, value) {
    series.data[index].n = value;
  });
  seriesArr.push(series);
});

This should yield :

seriesArr : [{
    name : 'Total',
    data : [
      {y:9.39, n:9.62},
      ...
    ]
  },
...
]

Then in your formatter function, you can acccess each as this.point.y or this.point.n

tooltip: {
  formatter: function () {
    return 'Y value is : ' + this.point.y + '<br>' + 'N value is : ' + this.point.n;
  }
},

Working: http://jsfiddle.net/sgearhart2/9P5fC/


Related Query

More Query from same tag