在某些情况下,工具提示格式化程序似乎要删除一个空格。
例如在http://jsfiddle.net/tobinibot/FaHNN/1。您可以看到,在格式化程序函数中,在元素和元素之间有一个空格,但是从视觉上看,生成的工具提示中似乎没有任何间距。如果在和元素之间有两个空格,那么工具提示就像我所期望的一样。
tooltip: {
formatter: function() {
return 'this.x + '<br/><span style="color: ' + this.series.color + ';">' + this.series.name + '</span> <strong>' + this.y + '</strong>';
// ^ problem spot is here
}
},
发布于 2013-12-16 00:18:41
在工具提示下添加useHTML: true,
tooltip: {
useHTML: true,
formatter: function() {
return this.x + '<br/><span style="color: ' + this.series.color + ';">' + this.series.name + '</span> <strong>' + this.y + '</strong>';
}
}
https://stackoverflow.com/questions/20603935
复制