图形间的间距
通过设置series中的itemStyle属性里的borderWidth和borderColor,将borderColor设置为当前背景色
itemStyle:{
borderWidth:3,
borderColor:'#fff',
}
不显示指针的仪表盘,半圆空心圆环
option = {
tooltip : {
formatter: "{a} <br/>{b} : {c}%"
},
toolbox: {
feature: {
restore: {},
saveAsImage: {}
}
},
series: [
{
name: '业务指标',
type: 'gauge',
splitNumber:60,
radius:'35%',
startAngle:-20,
endAngle:200,
detail: {
formatter:'{value}%',
color:'#38f',
fontWeight:'600',
offsetCenter:['0%', '30%']
},
title: {
color:'#000',
offsetCenter: [0, '5%'], // x, y,单位px
},
axisLine:{// 圆环样式
lineStyle:{
// width:30,
color:[[0.2, '#000'], [1, '#000']],
width:25,
opacity:0
}
},
axisTick:{// 刻度
show:false
},
axisLabel:{//刻度标签
show:false,
},
splitLine:{//分割线样式
lineStyle:{
width:2,
color:'#ffa200'
}
},
pointer:{
show:false
},
data: [{value: 100, name: '答题率'}]
}
]
};
myChart.setOption(option, true);