如何将工具提示添加到shinyDashbord中的框标题项

发布于 2025-01-10 17:47:07 字数 644 浏览 0 评论 0原文

我有一个简单的闪亮仪表板应用程序,其中有一个带有侧边栏的盒子。我想将工具提示添加到框标题中的侧边栏图标,以便当我将鼠标悬停在图标上时,工具提示会显示。这可能吗?

# 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) {
  }
)

感谢任何帮助

I have a simple shinyDashbord app with a box that has a sidebar in it. I would like to add tooltip to the sidebar icon in the box header so that when I hover the mouse over the icon, the tooltip shows up. Is that possible?

# 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) {
  }
)

Appreciate any help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

∝单色的世界 2025-01-17 17:47:07

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

https://github.com/RinteRface/bs4Dash/issues/267

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) { } )

工具提示示例

There is concise documentation at 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

There is concise documentation at https://github.com/RinteRface/bs4Dash/issues/267

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) { } )

tooltip example

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文