下面,我有一个闪亮的应用程序,它使用bioFabric软件包显示网络。正如您将看到的那样,当您将鼠标悬停在一个节点(正方形)上时,会得到它的名称和与其连接的节点的名称。边缘(线)是否可以实现相同的效果?将鼠标悬停在边缘上后,您应该使用相对边缘名称。
# Define UI for app that draws a biofabric ----
ui <- fluidPage(
# App title ----
titlePanel("Hello Biofabric!"),
p("sample shinyApp to check if it deploys to shinyapps.io"),
p("source at: "),
a(href="https://github.com/jas1/RBioFabricShinyExample","github:RBioFabricShinyExample"),
fluidRow(
column(width = 12,
# Output: biofabric ----
bioFabric_htmlwidgetOutput("output_biofabric_net",
width = "100%",
height = "500px") )
)
)
# server side
server <- function(input, output,session) {
# defining biofabric output
output$output_biofabric_net <- renderBioFabric_htmlwidget({
graph_data <- karate
bioFabric_htmlwidget( bioFabric(graph_data),height = 500 )
})
}
# Create Shiny app ----
shinyApp(ui = ui, server = server)