echarts在legend中显示name和百分比
echarts饼图在legend中显示name和具体的value以及百分比首先确定你的option名称,我的option名称是rateOption,如果你的和我的不一样在我的formatter函数中的rateOption修改为你自己的option名称。var rateOption = {legend:{},series: []}具体的formatter函数写在legend中,该函数是用来接收legend的回调函数。formatter:function (name) {var total=0
原创
2020-08-31 11:52:04 ·
4157 阅读 ·
0 评论