您可以使用
formatter
功能
tooltip
为此。
http://api.highcharts.com/highcharts#tooltip.formatter
演示:
http://jsfiddle.net/robschmuecker/qSfJw/2/
$(function () {
$('#container').highcharts({
tooltip: {
shared: true,
formatter: function () {
console.log(this.points);
return this.points[0].key + ' : ' + this.points[0].y + '<br/>' + this.points[1].key + ' : ' + this.points[1].y;
}
},
series: [{
name: 'Cities',
data: [
["Paris", 29.9],
["London", 71.5],
["New York", 106.4]
]
}, {
name: 'Universities',
data: [
["Cambridge", 17.5],
["Oxford", 1.5],
["MIT", 16.4]
]
}]
});
});