echart中的:graphic;直接加进去就可以
graphic: {
type: 'text',
left: 'center',
top: 'center',
zlevel: 100,
style: {
text: '{b|'+allTotal+'台}',
rich: {
b: {
fontSize: 25, // 不同样式的字号
}
},
fill: '#15E5E5', // 文本颜色
textAlign: 'center',
letterSpacing: 3 // 设置字间距
}
},
graphic里面还可以添加很多层
graphic: [
{
type: 'group', // 图形类型为group,可以包含多个子图形元素