html:
css:
#main10{
width:190px;
height:185px;
}
js:
var myChart10 = echarts.init(document.getElementById(‘main10’));
var option10 = {
title:{
text: “开展率”,
left: “center”,
bottom:‘0’,
textStyle: { // 文本样式
fontSize: 16,
color: ‘#ffffff’,
fontWeight: 500
}
},
series: [{
type: ‘liquidFill’,
data: [0.52],
radius: ‘62%’,
color: [’#1e7afd’],
label:{
normal:{
textStyle:{
fontSize:24,
color:’#ffffff’
}
}
},
itemStyle: { //普通样式
opacity: 0.6
},
backgroundStyle: {
color: ‘#407bf3’, // 水球未到的背景颜色
opacity: 0.5
},
emphasis: {
itemStyle: { //悬停样式
opacity: 0.9
}
}
}]
};
myChart10.setOption(option10);