实现效果:
关键代码
xAxis: [
{
type: 'category',
axisTick:{
show: false
},
axisLine:{
show: false
},
axisLabel:{
align:'center',
},
data: ['9-w2', '9-w3', '343','9-w2', '9-w3', '343']
},
{
type: 'category',
name: '排比变化',
nameTextStyle: {
verticalAlign: "left",
padding:[24,0,0,0]
},
nameLocation: 'start',
position: 'bottom',
offset: 18,
axisPointer: {
type: 'none'
},
axisTick:{
show: false
},
axisLine:{
show: false
},
axisLabel: {
interval:0,
align: 'center'
},
splitLine: { // 新增代码,设置分隔线样式
show: false,
lineStyle: {
type: 'dashed',
color: '#999',
width: 1
}
},
data: ['9-w23', '9-ww3', '343','9-w2', '9-w3', '343']
}
]