option = {
title: {
text: '社区服务评分',
textStyle:{color:'#FEFEFF'}
},
tooltip: {color: '#fff',
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
backgroundColor: '#081A40',
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value',
axisLabel:{show: true,
textStyle:{color:'#FEFEFF',
fontSize:'18'}},
splitLine:{show:false},},
yAxis: {
type: 'category',
data: [ '街道a','街道b','街道c','街道d','全市'],
axisLabel:{show: true,
textStyle:{color:'#FEFEFF',
fontSize:'18'}}
},
series: [{name: '服务评分',
type: 'bar',
barWidth: '60%',
backgroundColor: '#081A40',
data: [4.1,4.2,4.3,4.5,4.2]}
]
};
直接调用echart的柱状图
最新推荐文章于 2023-08-24 10:33:41 发布