如何使柱形图上下排列
配置项如下
option= {
tooltip: {
show: false
},
grid: {
top: '20%',
left: '5%',
right: '5%',
bottom: '15%',
},
xAxis: {
data: ['平均CPU\n利用率', '平均内存\n利用率'],
offset: 5,
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
color: '#000',
fontSize: 14
}
},
yAxis: {
min: 0,
max: 100,
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
show: false
}
},
series: [{
type: 'bar',
label: {
show: true,
position: 'top',
padding: 10,
color: '#000',
fontSize: 14,
formatter: '{c}%'
},
// itemStyle: {
// color: lightBlue
// },
barWidth: '40%',
data: [{
value:49,
itemStyle:{
borderColor:'#000',
color:'rgba(247, 204, 153, 1)'
}
},{
value:33,
itemStyle:{
borderColor:'#000',
color:'rgba(153, 153, 0, 1)'
}
}],
z: 10
}, {
type: 'bar',
barGap: '-100%',
barWidth: '40%',
data: [100, 100],
z: 5
}, {
type: 'bar',
barGap: '-100%',
itemStyle: {
color: '#fff',
borderColor:'#000',
opacity: 1
},
barWidth: '40%',
data: [100, 100],
z: 5
}, {
name: 'glyph',
type: 'pictorialBar',
barGap: '-100%',
// symbolPosition: 'end',
symbolSize: 64,
symbolOffset: [0, '-150%'],
data: [{
value: 100,
}, {
value: 100,
}]
}],
backgroundColor: "#fff",
};