(本文档仅供参考,仅适用于本文档中的示例报表/场景,若实际报表/场景与示例代码无法完全适配(如使用功能不一致,或多个宏代码冲突等),需根据实际需求开发代码)
(本示例已在V11版本中测试并验证通过)
如何调整进度图的描述信息,以及字体的颜色?
参考如下仪表盘宏处理:
function main(page: IPage, portlet: IEChartsPortlet) { let options = portlet.getChartOptions(); let title = options.title; title.forEach((item, index) => { // 替换文本内容 item.text = item.text.replace(/指标值/g, '付款金额').replace(/目标值/g, '收款金额'); item.textStyle = item.textStyle || {}; item.textStyle.color = '#52c41a'; // 绿色 }); portlet.setChartOptions(options); } |