我有一个饼图系列的数据,从最高值到最低值排序。我想让饼图分出第一个(最大)值。我尝试了一些没有成功的组合。我的饼图代码如下。Highcharts Pie,系列片第一项
如何通过初始化饼图来做到这一点?
$(divID).highcharts({
credits: false,
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: chartData.title
},
subtitle: {
text: chartData.subtitle
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
formatter: function() {
return Highcharts.numberFormat(Math.round(this.percentage * 100)/100, 1) + '%';
},
distance: -30,
color: 'black'
},
showInLegend: true
}
},
noData: {
enabled: true
},
series: [{
colorByPoint: true,
data: chartData.seriesData[0]
}]
});
我在init之后尝试过,但仍选择最后一个片。
$(divID).highcharts.series[0].data[0].slice();