<!--
为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
-->
### One-line summary [问题简述]
环状图现有label的formatter只能获取每条data的value,无法获取所有data的总和
### Version & Environment [版本及环境]
+ ECharts version [ECharts 版本]:4.0.4
+ Browser version [浏览器类型和版本]:chrome 68.0.3440.106(正式版本) (64 位)
+ OS Version [操作系统类型和版本]:windows10 64位
### Expected behaviour [期望结果]
希望在环状图中心,固定显示该环中所有数据的总和
### ECharts option [ECharts配置项]
<!-- Copy and paste your 'echarts option' here. -->
<!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
```javascript
option = {
legend: {
orient: 'vertical',
right: 'center',
top:'top',
data:this.legendArr,
show:false
},
series: [
{
name:name,
type:'pie',
radius: ['48%', '65%'],
avoidLabelOverlap: false,
label: {
normal: {
show: true,
position:'center',
formatter:function() {
var str = total+'\n'+name;
return str;
}
},
emphasis: {
show: true
}
},
labelLine: {
normal: {
show: false
},
emphasis: {
show: false
}
},
data:this.dataArr
}
]
}
```
### Other comments [其他信息]
<!-- For example: Screenshot or Online demo -->
<!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
[ Full content available at:
https://github.com/apache/incubator-echarts/issues/8944 ]
This message was relayed via gitbox.apache.org for [email protected]