本帖最后由 515275362 于 2024-7-22 09:59 编辑
echart想让背景透明,使用透明配置项([backcolor=rgba(245, 246, 249, 0.4)] [backcolor=rgba(245, 246, 249, 0.4)]backgroundColor[backcolor=rgba(245, 246, 249, 0.4)]: [backcolor=rgba(245, 246, 249, 0.4)]'rgba(0, 0, 0, 0)'[backcolor=rgba(245, 246, 249, 0.4)],)之后不起作用,这是为什么。var e = 80;
var option = {
backgroundColor: 'rgba(0, 0, 0, 0)',
title: {
show: true,
text: e + "%",
x: "center",
y: "center",// 通过x,y将标题(进度)定位在圆环中心
textStyle: {
fontSize: "25",
color: "black",
fontWeight: "400",
fontFamily: "DINPro, DINPro-Regular",
},
},
tooltip: {
trigger: "item",
formatter: "{d}%",
show: false,
},
legend: {
orient: "vertical",
x: "left",
show: false,
},
series: {
name: "",
type: "pie",
radius: ["65%", "85%"],
avoidLabelOverlap: true,
hoverAnimation: false,
label: {
normal: {
show: false,
position: "center",
},
emphasis: {
show: false,
},
},
labelLine: {
normal: {
show: false,
},
},
data: [
{
value: e,
name: "",
itemStyle: {
color: "#00F5FF",
},
},
{
value: 100 - e,
name: "",
itemStyle: {
color: " #191970",
},
},
],
},
}
|