Reputation: 660
Hi I am getting a following chart:
I want to hide the water info from the tooltip. How can I do that. You can use the following fiddle to play with it.
Thanks!!!
Upvotes: 3
Views: 2795
Reputation: 151
No need to customize the tooltipfunction. just add this to the series object which should be hidden:
'tooltip'=> [
'pointFormat'=> ''
]
Upvotes: 2
Reputation: 14462
You were almost there. You needed to check the api for the shared tooltip formatter. Put your check for the series you do not want inside the for each:
...
tooltip: {
formatter: function () {
var s = '<b>' + this.x + '</b>';
$.each(this.points, function () {
if (this.series.name != 'Water') {
s += '<br/>' + this.series.name + ': ' + this.y + 'm';
}
});
return s;
},
shared: true,
valueSuffix: ' cm'
},
...
Upvotes: 7