提示点样式

function(){

var per=(FR.remoteEvaluate("value('ds1',3,1,'"+this.seriesName+"')")*1).toFixed(2);

return "名称:"+this.seriesName+"<br>金额:"+this.value+"亿元"+"<br>同比:"+

(per<0?"<font color='#16c153'>▼</font>&nbsp":"<font color='#ea4431'>▲</font>&nbsp")+Math.abs(per)+"%";

}

目前这个JS样式如下

image.png

如何将这段JS修改为如下效果

image.png

同比的数值和单位也要跟随箭头颜色一起变化

用的饼图,表结构image.png

FineReport Scyalcire 发布于 2025-4-14 11:42
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
0
华莉星宸Lv7资深互助
发布于2025-4-14 11:46

function(){

var per=(FR.remoteEvaluate("value('ds1',3,1,'"+this.seriesName+"')")*1).toFixed(2);

return "名称:"+this.seriesName+"<br>金额:"+this.value+"亿元"+"<br>同比:"+

(per<0?"<font color='#16c153'>▼"+Math.abs(per)+"</font>&nbsp":"<font color='#ea4431'>▲"+Math.abs(per)+"</font>&nbsp")+"%";

}

最佳回答
0
snrtuemcLv8专家互助
发布于2025-4-14 11:44

数字百分比也要红色吗?

最佳回答
0
Z4u3z1Lv6专家互助
发布于2025-4-14 11:44

function(){

var per=(FR.remoteEvaluate("value('ds1',3,1,'"+this.seriesName+"')")*1).toFixed(2);

return "名称:"+this.seriesName+"<br>金额:"+this.value+"亿元"+"<br>同比:"+

(per<0?"<font color='#16c153'>▼</font>&nbsp":"<font color='#ea4431'>▲&nbsp")+Math.abs(per)+"%</font>";

}

  • 3关注人数
  • 32浏览人数
  • 最后回答于:2025-4-14 11:46
    请选择关闭问题的原因
    确定 取消
    返回顶部