I am trying to add percentage to legend data of pie chart.
Using this pie chart demo:
https://ecomfe.github.io/echarts-examples/public/editor.html?c=pie-doughnut
Tried to add formatter ( formatter: "{a}
{b}: {c} ({d}%)") to legend but does not work.
How to do this?
Legend formatter can't get percentage data. You need calculate it by yoursef
I have just needed this. If you are simply trying to add the '%' symbol as a suffix to the legend name then formatter: "{name} %" worked for me