我想通过rich设置总投入三个字为红色的样式,以下是代码
legend: [
{
data: ['投入的数据'],
top: 16,
right: 5,
itemHeight: 14,
textStyle: {
color: '#a9ddee',
fontSize: 14
},
rich: {
total: {
color: 'red'
}
},
formatter: (name) => {
return name + ' {total|总投入:}' + $drawData.MaxInLineVal
}
}
]
但是实际运行结果如下图
想应用名为total的样式,该如何做