You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何关闭ndtv包render.d3movie生成页的顶点tooltip交互提示

你可以在render.d3movie的参数中新增一行配置,给vertex.tooltip传入一个返回空字符串的匿名函数即可关闭顶点tooltip提示。你之前尝试的vertex.tooltip = F、vertex.tooltip = NA不生效,是因为该参数要求传入函数类型的取值,逻辑值和空值不会被识别为有效关闭配置。

修改后的代码如下:

render.d3movie(net, usearrows = T, label = "gmv_label",
               displaylabels = T,
               bg="#ffffff",
               edge.col = "#ff0063",
               vertex.col = "colo",
               vertex.cex = "amount",
               edge.lwd = 5,
               launchBrowser=T, filename= "XXX", # 注意文件名需要加引号定义
               render.par=list(tween.frames = 30, show.time = F),
               plot.par=list(mar=c(0,0,0,0)),
               # 新增以下这行配置关闭顶点tooltip
               vertex.tooltip = function(slice) {return("")})

如果你同时需要关闭边的tooltip提示,再额外添加edge.tooltip = function(slice) {return("")}参数即可。

内容的提问来源于stack exchange,提问作者jondoon1212

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.01 07:24:05