我的系列数据如下:-
[{"name":"Calculated Profit","data":[{"y":90,"rowData":{"Salesperson":"Dr. Gary Barlow","EP":90.00000,"AP":390.00000,"CP":90.00000,"Retries":1}},{"y":90,"rowData":{"Salesperson":"Fr. G R Blue","EP":90.00000,"AP":390.00000,"CP":90.00000,"Retries":1}},{"y":3332.8908,"rowData":{"Salesperson":"Miss Lynsey A Carr","EP":3332.89080,"AP":9252.84214,"CP":3332.89080,"Retries":3}},{"y":157.5,"rowData":{"Salesperson":"Mr. G WALTON","EP":157.50000,"AP":472.50000,"CP":157.50000,"Retries":1}},{"y":90,"rowData":{"Salesperson":"Mr. Jason Orange","EP":90.00000,"AP":390.00000,"CP":90.00000,"Retries":1}},{"y":3746.35416,"rowData":{"Salesperson":"Mr. Joe Bloggs","EP":3746.35416,"AP":11239.06249,"CP":3746.35416,"Retries":1}},{"y":90,"rowData":{"Salesperson":"Prof. Howard Donald","EP":90.00000,"AP":390.00000,"CP":90.00000,"Retries":1}},{"y":90,"rowData":{"Salesperson":"Prof. T V Smith","EP":90.00000,"AP":390.00000,"CP":90.00000,"Retries":1}},{"y":90,"rowData":{"Salesperson":"RtHon. H Q Brown","EP":90.00000,"AP":390.00000,"CP":90.00000,"Retries":1}}]}]
我的图表 plotOptions 如下:-
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true
},
tooltip: {
pointFormat: '{series.data.rowData.Salesperson}: <b>{point.percentage}%</b>',
percentageDecimals: 1
},
showInLegend: true
}
任何指针 .. 作为 Legend 显示为 {series.data.rowData.Salesperson}