解决:
1.直接加了个背景色,注:此背景色与当前显示区域的背景要一致
label: {
show: true,
position: "center",
formatter: (param) => {
// 格式化要展示的文本
return `{value|${param.value}%}\n{name|${param.name}}`;
},
rich: {
//文本样式
value: {
fontFamily: "微软雅黑",
fontSize: 25,
color: "#6c7a89",
lineHeight: 30,
backgroundColor: "#161718",
},
name: {
fontSize: 16,
fontFamily: "微软雅黑",
color: "#454c5c",
backgroundColor: "#161718",
},
},
},