我有一个带有工具提示的饼图,其中显示了一些额外的数据。如何获取要与数据表一起导出的数据?
当您点击导出>查看数据表时,我需要将{point.custom}添加为一列
JSFiddle链接:https://jsfiddle.net/mewohraz/1/
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Browser market shares in January, 2018'
},
tooltip: {
pointFormat: '{point.custom}'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
name: 'Brands',
colorByPoint: true,
data: [{
name: 'Chrome',
y: 61.41,
custom: 200,
sliced: true,
selected: true
}, {
name: 'Internet Explorer',
y: 11.84,
custom: 100
}, {
name: 'Firefox',
y: 10.85,
custom: 300
}]
}]
});
答案 0 :(得分:1)