echarts [Bug] cannot show percentage in sunburst label

xzlaal3s  于 4个月前  发布在  Echarts
关注(0)|答案(4)|浏览(101)

Version

5.4.2

https://echarts.apache.org/examples/en/editor.html?c=sunburst-borderRadius

Steps to Reproduce

add formatter in sunburst label in the following link:
option = {
series: {
type: 'sunburst',
data: data,
radius: [60, '90%'],
itemStyle: {
borderRadius: 7,
borderWidth: 2
},
label: {
show: true,
formatter: '{b}: {d}%',
}
}
};

Current Behavior

cannot show {d}% in chart

Expected Behavior

show {d}% in charts correctly

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

s1ag04yj

s1ag04yj1#

hello i want to work on this so please give me permission to fix this problem.....

olhwl3o2

olhwl3o22#

@vikas-6 Feel free to solve this issue, you don't need a permission

zsbz8rwp

zsbz8rwp3#

https://codepen.io/VIKAS-KUMAR-the-vuer/pen/NWEpdOY ----------- I fixed it now it show {d}% in charts correctly....

bttbmeg0

bttbmeg04#

@vikas-6
Thank you for this amazing fix. It does work. But it would be awesome if you can round it to 2 decimals like in the other charts.

相关问题