option = {
series: [
{
type: 'pie',
clockWise: false,
startAngle: 90,
radius: ['60%', '90%'],
data: [100],
itemStyle: {
color: '#eee'
},
animation: false
},
{
type: 'pie',
clockWise: true,
startAngle: 90,
labelLine: {
show: false
},
radius: ['60%', '90%'],
data: [
{
value: 1,
label: {
normal: {
formatter: `{label|${1}}%`,
position: 'center',
show: true,
textStyle: {
fontSize: '20',
fontWeight: 'normal',
color: '#fff',
lineHeight: 20,
rich: {
label: {
fontSize: '28',
fontWeight: 'normal',
color: '#666'
},
value: {
fontSize: '20',
fontWeight: 'normal',
lineHeight: 40,
// padding: [25, 0, 25, 0],
color: '#333'
},
unit: {
fontSize: '14',
fontWeight: 'normal',
color: '#aaa',
padding: [0, 0, 0, 5]
}
}
}
}
},
itemStyle: {
// borderCap: 'round',
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: '#ffed9f',
},
{
offset: 1,
color: '#ff9d0f',
},
],
false
),
borderRadius: ['50%', '50%']
}
}
},
{
value: 100 - current,
itemStyle: {
normal: {
color: 'transparent',
borderCap: 'round'
}
}
}
]
}
]
};