Hovering over a series in Highchart graph displays a popup with series name and Y value, in the example: 'Tokyo 9.5ºC'. I would like to display my own, custom text on hover - I can do that by modifying each point's name. At the same time I would like to hide the default series name and Y value. I've searched the doc but haven't found anything suitable. Any ideas how to approach this?
You'll have to specify a tooltip formatter yourself (see documentation):
tooltip: {
formatter: function() {
return 'The value for <b>'+ this.x +
'</b> is <b>'+ this.y +'</b>';
}
},
there you can just show the x-values if you like or your custom text.
Hope that helps.
I have modified the DEMO and created a new DEMO here
To customize the text displayed in the tooltip
, you should use it like:
Highcharts.chart('container', {
title: {
text: 'Solar Employment Growth by Sector, 2010-2016'
},
subtitle: {
text: 'Source: thesolarfoundation.com'
},
........
.....
....
tooltip: {
formatter: function() {
return '<strong>X value: </strong>'+ this.x;
}
},
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With