Display legend inside a pie chart with fusion chart

◇◆丶佛笑我妖孽 提交于 2019-12-14 03:49:03

问题


I want to display legend with it's value inside pie chart. I googled it a lot but didn't get any solution. Also, there is no option in fusion charts to achieve this directly. Can anyone please suggest what trick can I apply to do so? I think I need to modify lot of things in library which I don't want so please help me.

Refer below image

I'm using angular-fusion charts library so I want to do this in angular way.


回答1:


If you are using FusionCharts you can achieve this using the attribute "placeValuesInside='1'"

// Sample data
{
"chart": {
    "showpercentagevalues": "1",
    "use3dlighting": "0",
    "showshadow": "0",
    "placevaluesinside": "1",
    "animation": "0"
},
"data": [{
        "label": "ST_Clean",
        "value": "33",
        "color": "f7bc34"
    }, {
        "label": "ST_Eff",
        "value": "67",
        "color": "e24b1a"
    }]
}


来源:https://stackoverflow.com/questions/30349056/display-legend-inside-a-pie-chart-with-fusion-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!