problem description
I want the background of the outermost label to correspond to the color of the inner circle
the environmental background of the problems and what methods you have tried
attempts to change backgroundColor into an array, passing in color values, and the code does not take effect;
also tries to write formatter, in backgroundColor and finds that it cannot be entered
related codes
/ / Please paste the code text below (do not replace the code with pictures)
series: [
{
name:"",
type:"pie",
selectedMode: "single",
radius: [0, "30%"],
label: {
normal: {
position: "inner"
}
},
labelLine: {
normal: {
show: false
}
},
data:[
{value:335, name:"", selected:true},
{value:679, name:""},
{value:1548, name:""}
]
},
{
name:"",
type:"pie",
radius: ["40%", "55%"],
label: {
normal: {
formatter: "{a|{a}}{abg|}\n{hr|}\n {b|{b}:}{c} {per|{d}%} ",
backgroundColor: "-sharpeee",
borderColor: "-sharpaaa",
borderWidth: 1,
borderRadius: 4,
// shadowBlur:3,
// shadowOffsetX: 2,
// shadowOffsetY: 2,
// shadowColor: "-sharp999",
// padding: [0, 7],
rich: {
a: {
color: "-sharp999",
lineHeight: 22,
align: "center"
},
// abg: {
// backgroundColor: "-sharp333",
// width: "100%",
// align: "right",
// height: 22,
// borderRadius: [4, 4, 0, 0]
// },
hr: {
borderColor: "-sharpaaa",
width: "100%",
borderWidth: 0.5,
height: 0
},
b: {
fontSize: 16,
lineHeight: 33
},
per: {
color: "-sharpeee",
backgroundColor: "-sharp334455",
padding: [2, 4],
borderRadius: 2
}
}
}
},
what result do you expect? What is the error message actually seen?
expect the background color in the label to correspond to the background color of the inner ring one by one