legend: [
{
data: [{
name: 'Excellent',
itemStyle: {
color: 'rgb(147 210 243 / 50%)'
}
}, {
name: 'Good',
itemStyle: {
color: 'rgb(162 239 77 / 50%)'
}
}, {
name: 'Fair',
itemStyle: {
color: 'rgb(252 202 0 / 50%)'
}
}, {
name: 'Need Improvement',
itemStyle: {
color: 'rgb(222 134 143 / 50%)'
}
}],
show: true,
top: 10,
left: 140,
icon: "rect",
selectedMode: false,
textStyle: {
color: '#fff',
fontSize: 16
}
},
{
data: legendData,
top: 35,
textStyle: {
color: '#fff',
fontSize: 16
}
}
],
标签:颜色,name,自定义,color,itemStyle,50%,rgb,legend
From: https://www.cnblogs.com/duixue/p/18520032