var option={
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'none'
},
formatter:'{b}:{c}%'
},
xAxis: {
type: 'value',
show:false,
min:0,
max:100,
},
grid: {
height:'60%',
width:'75%',
top:'20%'
},
yAxis: {
position: "right",
type: 'category',
data: ['博士', '硕士'],
axisTick: {
show: false
},
axisLine: { // 坐标轴 轴线
show: false, // 是否显示
},
axisLabel: {
fontWeight: 'bold',
color: "#37e9fc",
fontSize:16,
},
},
series: [{
data: [25, 75],
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)',
barBorderRadius: [20, 20, 20 ,20]
},
itemStyle: { // 图形的形状
barBorderRadius: [20, 20, 20 ,20],
color:'#37e9fc',
},
barCategoryGap: "50%",
barWidth:'40%'
}]
};