label设置不同的样式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
options = {
//...
series: [
{
// ...
label: {
show: true,
formatter: function(v) {
return `{d|${v.percent}%}\n\n{b|${v.name}}`
},
rich: {
d: {
fontSize: 20,
fontFamily: 'PingFang SC',
fontWeight: 500,
color: 'rgba(248, 181, 43, 1)'
},
b: {
fontSize: 18,
fontFamily: 'PingFang SC',
fontWeight: 400,
color: '#48AAFE'
}
}
}
}
]
}

{styleName|text content text content}使用|隔开,前面是样式名,后面是值

标签的视觉引导线消失的原因

  1. 设置了label.position

最后更新: 2021年11月16日 16:00