把前后颜色设置相同即可。
const POLAR_OPTIONS = {
title: {
show: true,
text: '90.54%',
textStyle: {
fontSize: 14,
color: '#449aff',
},
x: 'center',
y: 'center',
},
grid: {
left: '20px',
right: '20px',
bottom: '10%',
top: '0px',
containLabel: true,
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)',
},
legend: {
orient: 'vertical',
x: 'center',
top: '85%',
data: ['磁盘空间使用正常'],
selectedMode: false,
},
color: ['#449aff', '#e6e6e6'],
series: [
{
name: '磁盘使用情况',
type: 'pie',
radius: ['30%', '60%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
},
emphasis: {
show: false,
},
},
labelLine: {
normal: {
show: false,
},
},
data: [
{ value: 335, name: '磁盘空间使用正常' },
{
value: 35,
name: '未使用',
itemStyle: {
normal: { color: '#e6e6e6' }, //正常颜色
emphasis: { color: '#e6e6e6' }, //鼠标移入颜色
},
},
],
},
],
}