【发布时间】:2017-07-28 06:04:36
【问题描述】:
我有一个堆叠组柱形图,如下面提供的小提琴所示。在 xAxis 标签(红色块)中,我想显示从第二列的总数中减去的堆积量的总数。例如,对于“Value1”,我想在标签 (100-(43+15)) 中显示 42。现在,我只能访问 x 值,这些值在格式化程序函数 (this.value) 中返回。 https://jsfiddle.net/er1187/n6sr0znx/
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']
}]
【问题讨论】: