之前:
series: [
{
name: this.firstSupport,
type: "bar",
stack: "总量",
label: {
show: true,
position: "top",
},
data: this.datas1,
color: this.colorSupport[0],
},
{
name: this.secondName,
type: "bar",
stack: "总量",
label: {
show: true,
position: "bottom",
formatter: function (value) {
return Math.abs(value.data);
}, //直接添加此方法
},
data: this.datas2,
color: this.colorSupport[1],
},
],
};
修改之后: