Reputation: 35
I need the information form mouse over on the point in Highcharts line chart, I tried to use tooltip but there is an error as: function statement requires a name. I have put the formatter in a plotOptions as the onclick
function. I don't know if I can use these two options together. I need also to get the line names.
plotOptions:{
series:{
allowPointSelect: true,
point: {
events:{
click: function(e) {/*$("#displayText").html(e.currentTarget.y)*/
tooltip: {
formatter: function () {
alert(this.x);
}
},
}
}
},
}
},
Upvotes: 0
Views: 1058
Reputation: 35
Ok, I was totally wrong. Here is the answer to retrieve line chart data.
plotOptions:{
series:{
allowPointSelect: true,
point: {
events:{
click: function() {
alert('Category: ' + this.category + ', value: ' + this.series.name ); //this.x+1 is the msgID
}
}
},
}
},
Upvotes: 1