1
如果值爲零,我有隱藏標籤內數字的代碼。我的問題是,我也想隱藏顯示在列上的總和號碼。如果爲零,則隱藏stacklabel
這裏是一個例子,最後一個標籤。 http://jsfiddle.net/4NxYh/72/
plotOptions: {
line: {dataLabels: {enabled: true, style: {fontSize: '8px'}, style: {textShadow: false}, allowDecimals: true, formatter: function() {return this.y + 'e'}}},
column: {stacking: 'normal', shadow: false, dataLabels: {
formatter:function() {
if(this.y != 0) {
return this.y;
}
},
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
style: {
textShadow: '0 0 3px black',
fontSize: '8px'
}
}},
series: {minPointLength: 0}
},
謝謝麥克,非常有幫助! – Andy