我有以下格式["event",3],["status",998]
的数据。我正在使用饼图来显示数据。在工具提示中,我得到了名称和百分比,但我希望我的工具提示更像[event:3]
。我怎么能这样做?
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#000000',
connectorColor: '#000000',
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.percentage
}
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [["event",2],["status",30]]
}]
答案 0 :(得分:0)
找到答案
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.percentage
}
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [["event",2],["status",30]]
}]