(此文档仅供参考)
问题
横条图原始数据项标签如下截图,希望左边的数据项标签显示为正值:
解决方案
可以参考以下扩展属性去实现:
代码块 | ||
---|---|---|
| ||
{
"series": [{},{
"label": {
"normal": {
"show": true,
"textStyle": {
},
"formatter": "function(params){return params.value[0]*-1;}"
}
}
}]
} |
实现效果如下: