0
我該如何刪除圖表上顯示的圖例,並將圖例保留在圖表底部?Highcharts:刪除圖例只顯示在圖表上並保留底部圖例
Highcharts.chart('operatingSystemReleaseChart', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie',
margin: [0, 0, 40, 0],
spacingTop: 0,
spacingBottom: 0,
spacingLeft: 0,
spacingRight: 0,
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
title: {
text: ""
},
tooltip: {
shared: false,
borderRadius: 3,
borderWidth: 0,
shadow: false,
enabled: true,
backgroundColor: 'none',
useHTML: true,
formatter: function() {
return '<div class="tooltipHC"><div>'+this.point.name+'</div>' +
'<div>Total:<b class="pull-right">'+this.y+'</b></div>' +
'<div>Total(%):<b class="pull-right">'+Highcharts.numberFormat(this.percentage)+' %</b></div></div>';
}
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
size: "100%",
dataLabels: {
enabled: true,
},
showInLegend: true,
borderWidth: 0
}
},
series: [{
name: 'Total',
colorByPoint: true,
data: arrayForPieChart
}]
});