如图:我想让蓝色柱子,从-100开始显示
yAxis: {
type: 'value',
axisLabel: {
formatter: (value) => value + (-800)
}
}
800是你数据的最小值,需要注意的是这样修改不显示0标线
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisLine:{
show:true,
onZero:false
}
},
yAxis: {
type: 'value',
data:[200,100,0,-100,-200],
},
series: [{
data: [-120, -200, -150, -80, -70, -110, -130],
type: 'bar'
}]