用 echarts 实现 饼状图 这种
const gaugeData = [
{
value: 40,
name: '447',
title: {
offsetCenter: ['0%', '0%']
},
detail: {
color: '#B5B5BE',
fontWeight: 400,
fontSize: '14px',
lineHeight: 24,
fontFamily: 'PingFangSC-Regular',
valueAnimation: true,
offsetCenter: ['0%', '-10%']
}
},
];
option = {
series: [
{
type: 'gauge',
startAngle: 90,
endAngle: -270,
pointer: {
show: false
},
progress: {
show: true,
overlap: false,
roundCap: true,
clip: false,
},
axisLine: {
lineStyle: {
width: 30
}
},
splitLine: {
show: false,
distance: 0,
length: 10
},
axisTick: {
show: false
},
axisLabel: {
show: false,
distance: 50
},
data: gaugeData,
title: {
fontSize: 14
},
detail: {
formatter: 'QBI {value}%'
}
}
]
};
参考配置