大神们,帮帮忙,在xAxis -> axisLabel -> show 为false的情况下,怎么能让坐标轴刻度标签跟show为true时显示的一样?
配置项如下
option = {
title: {
text: 'Awesome Chart'
},
grid: {
borderWidth: 0
},
xAxis: {
type: 'category',
boundaryGap: true,
data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
axisLine: {
show: true
},
splitLine: {
show: false
},
axisLabel: {
show: false
}
},
yAxis: {
type: 'value',
axisLine: {
show: true
},
axisTick: {
show: false
},
splitLine: {
lineStyle: {
color: '#efefef',
}
}
},
brush: {
toolbox: ['lineX', 'keep', 'clear'],
xAxisIndex: 'all',
transformable: true,
brushStyle: {
borderWidth: 1,
color: 'rgba(26,179,148,0.3)',
borderColor: 'rgba(26,179,148,0.3)'
},
brushMode: 'single',
brushType: 'lineX',
removeOnClick: false,
throttleType: 'debounce',
throttleDelay: 300,
inBrush: {
colorAlpha: 1
},
outOfBrush: {
colorAlpha: 1
}
},
series: [{
type: 'bar',
data: [220, 182, 191, 234, 290, 330, 310]
}]
};