You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/03/18 09:40:29 UTC
[GitHub] [incubator-echarts] zl7261 commented on issue #12294: formatter函数的使用方式并不统一
zl7261 commented on issue #12294: formatter函数的使用方式并不统一
URL: https://github.com/apache/incubator-echarts/issues/12294#issuecomment-600519653
已解决
formatter 返回textStyle需要的格式
```javascript
return (
`{name|${name}} {percent|${percent}%} {value|${targetValue}}`
)
```
再在textStyle.rich中设置宽度
可实现对齐的效果
```json
textStyle: {
rich: {
name: {
color: '#333333',
width: 60
},
percent: {
color: '#333333',
width: 60
},
value: {
fontSize: 18
}
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org