问题描述
我们可以使用visOptions(manipulation = T)
打开对visNetwork图形输出的操作。在删除节点或边时,要求用户确认。
这是一个例子:
require(shiny)
require(visNetwork)
library(dplyr)
nodes = data.frame(id = c("foo","bar"),label = c("Foo","Bar"),stringsAsFactors = F)
edges = data.frame(id = "foobar",from = "foo",to = "bar",stringsAsFactors = F)
ui <- fluidPage(visNetworkOutput("editable_network",height = "400px"))
server <- function(input,output) {
output$editable_network <- renderVisNetwork({
visNetwork(nodes,edges) %>%
visOptions(manipulation = T)
})
}
shinyApp(ui = ui,server = server)
我发现与此功能相关的唯一问题是this on extracting manipulation changes。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)