ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### echars饼图南丁格尔图极差较大半径问题 > 放大值 ```vue //放大值 var pieData = this.ageStatistics; var showData = []; var sum = 0, max = 0; pieData.forEach((item) => { sum += item.value; if (item.value >= max) max = item.value; }); // 放大规则 var number = Math.round(max * 0.8); showData = pieData.map((item) => { return { value: number + item.value, type: item.type, }; }); ``` > 还原值 - antv的玫瑰图 ```vue meta: { value: { alias: "年份", formatter: function(param) { return param - number; }, }, }, ``` ```vue //还原值 tooltip: { trigger: "item", formatter: function(param) { return ( param.name + ": " + (param.value - number) + " " + (((param.value - number) / sum) * 100).toFixed(2) + "%" ); }, }, ```