如何将工具提示添加到 shinyDashbord 中的框 header 项
How to add tooltip to box header items in shinyDashbord
我有一个简单的 shinyDashbord 应用程序,它有一个盒子,里面有一个边栏。我想将工具提示添加到框 header 中的侧边栏图标,这样当我将鼠标悬停在图标上时,工具提示就会显示出来。这可能吗?
# Toggle a box sidebar
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
body = dashboardBody(
box(
height = "500px",
width = 12,
maximizable = T,
solidHeader = FALSE,
collapsible = TRUE,
sidebar = boxSidebar(
id = "mycardsidebar",
width = 30,
p("Sidebar Content")
)
),
),
sidebar = dashboardSidebar()
),
server = function(input, output, session) {
}
)
感谢任何帮助
https://github.com/RinteRface/bs4Dash/issues/267
处有简明文档
# Toggle a box sidebar
library(shiny)
library(bs4Dash)
sidebar <- boxSidebar(
id = "mycardsidebar",
width = 30,
p("Sidebar Content")
)
sidebar[[1]]$attribs$`data-original-title` <- "Custom tooltip display"
shinyApp(
ui = dashboardPage(
help = TRUE,
header = dashboardHeader(),
body = dashboardBody(
box(
height = "500px",
width = 12,
maximizable = T,
solidHeader = FALSE,
collapsible = TRUE,
sidebar = sidebar
),
),
sidebar = dashboardSidebar()
),
server = function(input, output, session) {
}
)
我有一个简单的 shinyDashbord 应用程序,它有一个盒子,里面有一个边栏。我想将工具提示添加到框 header 中的侧边栏图标,这样当我将鼠标悬停在图标上时,工具提示就会显示出来。这可能吗?
# Toggle a box sidebar
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
header = dashboardHeader(),
body = dashboardBody(
box(
height = "500px",
width = 12,
maximizable = T,
solidHeader = FALSE,
collapsible = TRUE,
sidebar = boxSidebar(
id = "mycardsidebar",
width = 30,
p("Sidebar Content")
)
),
),
sidebar = dashboardSidebar()
),
server = function(input, output, session) {
}
)
感谢任何帮助
https://github.com/RinteRface/bs4Dash/issues/267
处有简明文档# Toggle a box sidebar
library(shiny)
library(bs4Dash)
sidebar <- boxSidebar(
id = "mycardsidebar",
width = 30,
p("Sidebar Content")
)
sidebar[[1]]$attribs$`data-original-title` <- "Custom tooltip display"
shinyApp(
ui = dashboardPage(
help = TRUE,
header = dashboardHeader(),
body = dashboardBody(
box(
height = "500px",
width = 12,
maximizable = T,
solidHeader = FALSE,
collapsible = TRUE,
sidebar = sidebar
),
),
sidebar = dashboardSidebar()
),
server = function(input, output, session) {
}
)