如图,多个grid,想只显示第一个grid的y轴坐标值,而其它的y轴坐标不显示,请问该怎么做?
配置项如下
option = {
title: {
text: 'F30 Rework Time'
},
itemGap: 100,
grid: [
{
show: true,
left: '36',
y: '25%',
width: '100',
borderWidth: 60,
borderColor: '#B9D0DD',
backgroundColor: '#B9D0DD',
height: '58%',
containLabel: false
},
{
show: true,
left: '205',
y: '25%',
width: '325',
borderWidth: 60,
borderColor: '#B9D0DD',
backgroundColor: '#B9D0DD',
height: '58%',
containLabel: false
},
{
show: true,
left: '600',
y: '25%',
width: '125',
borderWidth: 60,
borderColor: '#B9D0DD',
backgroundColor: '#B9D0DD',
height: '58%',
containLabel: false
},
{
show: true,
left: '795',
y: '25%',
width: '200',
borderWidth: 60,
borderColor: '#B9D0DD',
backgroundColor: '#B9D0DD',
height: '58%',
containLabel: false
}
],
xAxis: [{
gridIndex: 0,
z: 2,
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
width: 1
}
},
data: ["2014", "2015", "2016"]
}, {
gridIndex: 1,
z: 2,
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
width: 1
}
},
data: ["10", "11", "12", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
}, {
gridIndex: 2,
z: 2,
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
width: 1
}
},
data: ["35", "36", "37", "38"]
}, {
gridIndex: 3,
z: 2,
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
width: 1
}
},
data: ["19-SEP", "20-SEP", "21-SEP", "22-SEP", "23-SEP", "24-SEP", "25-SEP"]
}],
yAxis: [{
gridIndex: 0,
z: 2,
name:'y轴',
axisTick: {
show: true
},
axisLine: {
show: true
},
splitLine: {
lineStyle: {
color: '#E8ECF1',
width: 1
}
},
min: 0,
max: 24
}, {
gridIndex: 1,
z: 2,
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel:{
show:false
},
splitLine: {
lineStyle: {
color: '#E8ECF1',
width: 1
}
},
min: 0,
max: 24
}, {
gridIndex: 2,
z: 2,
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel:{
show:false
},
splitLine: {
lineStyle: {
color: '#E8ECF1',
width: 1
}
},
min: 0,
max: 24
}, {
gridIndex: 3,
z: 2,
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel:{
show:false
},
splitLine: {
lineStyle: {
color: '#E8ECF1',
width: 1
}
},
min: 0,
max: 24
}],
series: [{//ins
name: 'Year',
type: 'bar',
xAxisIndex: 0,
yAxisIndex: 0,
itemStyle: {
normal: {
color: '#5E92A7'
}
},
stack: 1,
barCategoryGap: '1',
data: [15, 15, 5]
}, {
name: 'Month',
type: 'bar',
xAxisIndex: 1,
yAxisIndex: 1,
itemStyle: {
normal: {
color: '#00CA66'
}
},
stack: 2,
barCategoryGap: '1',
data: [15, 15, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5]
}, {
name: 'Week',
type: 'bar',
xAxisIndex: 2,
yAxisIndex: 2,
itemStyle: {
normal: {
color: '#00CA66'
}
},
stack: 3,
barCategoryGap: '1',
data: [5, 5, 5, 5]
}, {
name: 'Day',
type: 'bar',
xAxisIndex: 3,
yAxisIndex: 3,
itemStyle: {
normal: {
color: '#00CA66'
}
},
stack: 4,
barCategoryGap: '1',
data: [5, 5, 5, 5, 5, 5, 5]
}]
};