0
我有一個堆疊組列圖,如下面提供的小提琴中所示。在xAxis標籤(紅色塊)中,我想顯示從第二列總和中減去的堆積金額的總和。例如,對於「Value1」,我想在標籤(100-(43 + 15))中顯示42。現在,我只能訪問我在格式化函數(this.value)中返回的x值。 https://jsfiddle.net/er1187/n6sr0znx/HighCharts顯示標籤中堆疊列的總數
xAxis: [{
offset: -280,
tickWidth: 0,
lineWidth: 0,
categories: ['Value1', 'Value2', 'Value3'],
labels: {
x: 5,
useHTML: true,
style:{
backgroundColor: 'red',
color: 'white'
},
formatter: function() {
return this.value;
}
}
}, {
linkedTo: 0,
categories: ['Value1', 'Value2', 'Value3']
}]
這工作,非常感謝! – ellier7