问题
I had trouble to add images to Highmap bubble tooltip when hover over bubbles. Anyone knows how to fix it?
Thanks a lot
Here is an example link. Images added on line 24: http://jsfiddle.net/1jm2yxbq/
tooltip: {
formatter: function () {
return '<img src="http://www.w3schools.com/tags/smiley.gif" width="42" height="42">';
}},
回答1:
You just need to set the useHTML
property to true
:
tooltip: {
useHTML: true,
formatter: function () {
return '<img src="http://www.w3schools.com/tags/smiley.gif" width="42" height="42">';
}
},
I tested it out on the fiddle and it works fine: http://jsfiddle.net/1jm2yxbq/1/
来源:https://stackoverflow.com/questions/40557751/highcharts-map-add-image-to-tooltip