11版本FVS需要再条形图里的提示里显示年月,但是这个年月是如期空间里的值,是可以变化的。 下边的FR.remoteEvaluate("VALUE('5_top客户',1,1)")在数据集里获取不到预览是空的。不知到怎么改。改成 var sqlResult = FR.remoteEvaluate('=sql("数据集名称","SELECT substr(yszyd,0,4)||\'年\'||substr(yszyd,6,7)||\'月\' as 月份 FROM 表 WHERE yszyd = \'${FORMAT(zxny,"yyyy-MM")}\'",1,1)'); 也不对。 哪里有问题? 条形图提示里的自定义js。 function sumLabel(){ const point = this; const points = point.points; const validPoints = points.filter( (point) => point.isVisible() ); let total = 0; let value =this.category; const per=FR.remoteEvaluate("VALUE('5_top客户',1,1)") for(let i = 0; i < validPoints.length; i++){ total += validPoints[i].value; } for(var i = 0;i < points.length;i++) { if(points[i].series.visible){ value += ''+points[i].seriesName+FR.contentFormat(points[i].value.toFixed(2), '#,##0.00')+"万元"; } } return per+''+value+'' +"两金余额"+FR.contentFormat(total.toFixed(2), '#,##0.00')+"万元"; } |
0
|
|