如何在tooltip格式化程序中显示series.name?目前它只显示{series.name}。
tooltip: {
formatter: function () {
return '<b>{series.name}: ' + Highcharts.numberFormat(this.y, 2) + '</b>';
}
},
编辑:
new tooltip has been initially created in c#
tooltip = new { pointFormat = "<span style=\"color: {series.color}\">\u25CF</span> {series.name}: <b>{point.y:,.1f}</b><br/>" };
...我可以将this.y值重写为2位小数,但是通过显示series.name
而卡住了答案 0 :(得分:4)
tooltip: {
formatter: function () {
return '<b>' + this.series.name + ': '+ Highcharts.numberFormat(this.y, 2) + '</b>';
}
}