如何才能将下图中显示的工具提示显示为共享?
您可能需要查看Highcharts API Reference(特别是有关共享选项的信息):http://api.highcharts.com/highcharts#tooltip.formatter
这是jsfiddle:http://jsfiddle.net/iginisruber/Ltqnab9x/1/
全屏:http://jsfiddle.net/iginisruber/Ltqnab9x/1/embedded/result/
我试过这个,但它不起作用:
tooltip: {
shared: true,
formatter: function () {
var y_value_kwh = (this.points[i].y/1000).toFixed(2);
return '<span style="font-size: 10px">' + this.key + '</span><br/>' + '<span style="color:' + this.points[i].series.color + '">\u25CF</span> ' + this.points[i].series.name + ': <b>' + y_value_kwh + ' kWh</b><br/>';
},
},Run Code Online (Sandbox Code Playgroud)
当前代码:
tooltip: {
//shared: true,
formatter: function () {
var y_value_kwh = (this.y/1000).toFixed(2);
return '<span style="font-size: 10px">' + this.key + '</span><br/>' + '<span style="color:' …Run Code Online (Sandbox Code Playgroud)