如何在Echarts的y轴上实现起点和0刻度之间的边距?
How to implement a margin between start point and 0 scale on y-axis on Echarts?
我正在使用 Echarts 构建条形图,请问有人知道如何在起点和 y 轴上的 0 刻度之间实现边距吗?
The expect effects of y-axis like this
已解决。
xAxis: {
type: 'category',
data: {},
axisTick: {
//...
},
axisLine: {
onZero: false // This is important, so x axis can start from non-zero number
}
},
yAxis: {
splitLine: { show: false },
max: 'dataMax',
type: 'value',
min: -7 // This is also important, y axis can start from a negative number
}
我正在使用 Echarts 构建条形图,请问有人知道如何在起点和 y 轴上的 0 刻度之间实现边距吗?
The expect effects of y-axis like this
已解决。
xAxis: {
type: 'category',
data: {},
axisTick: {
//...
},
axisLine: {
onZero: false // This is important, so x axis can start from non-zero number
}
},
yAxis: {
splitLine: { show: false },
max: 'dataMax',
type: 'value',
min: -7 // This is also important, y axis can start from a negative number
}