想把占比和值都显示出来,但是添加没有成功,占比是参考自定义标签求占比的文档,怎么把值也显示出来呢,值的格式怎么定义
参考的文档https://help.fanruan.com/finereport/doc-view-4370.html
想把值也显示出来
你现在的图表是如何的,数据是如何的,发截图看一下
function() {
var points = this.series.points; //获取当前系列所有的数据点
var total = 0;
for (var i = 0, len = points.length; i < len; i++) {
total += points[i].value; //求分类下的系列和
}
return "值为:"+this.value+"<br>占比为:"+FR.contentFormat(this.value/total, '#0%'); //求占比
https://help.fanruan.com/finereport/doc-view-4370.html
这个就是值啊
function() {var points = this.series.points; //获取当前系列所有的数据点var total = 0;for (var i = 0, len = points.length; i < len; i++) {total += points[i].value; //求分类下的系列和}return "值:"+this.value+"<br>占比:"+FR.contentFormat(this.value/total, '#0%'); //求占比}
然后把上图中 使用html解析 选中