echart 圆环图配置
echart版本:5.4.0
let current = 0; // 当前用量
let all = 100; // 总量
let option = {
animation:false,
backgroundColor:"transparent",
tooltip: {
trigger: 'item',
show: false,
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
series: [
{
type: 'pie',
silent:true,
label: {
show: false
},
center: ['50%', '50%'],
radius: ['45%', '70%'],
// startAngle: 180,
itemStyle: {
borderRadius: 50,
},
data: [
{
value: 1050,
itemStyle: {
color: '#E7EDFC'
}
},
{
value: 0,
itemStyle: {
color: 'transparent'
}
},
]
},
{
type: 'pie',
label: {
show: false
},
silent:true,
center: ['50%', '50%'],
radius: ['45%', '70%'],
// startAngle: 180,
itemStyle: {
borderRadius: 50,
},
data: [{
value: 858,
itemStyle: {
color: {
type: 'linear',
colorStops: [
{
offset: 0,
color: '#4973ED'
},
{
offset: 1,
color: '#7284F8'
}
]
}
}
},
{
value: 192,
itemStyle: {
color: 'transparent'
}
},
]
}
]
};
效果图:
