tooltip on shiny R?

前端 未结 2 1119
-上瘾入骨i
-上瘾入骨i 2020-12-12 14:50

I want to have a tool-tip in my Shiny R application. Is there any easy way to achieve that? For now, I am creating a density map and I want a simpl

2条回答
  •  臣服心动
    2020-12-12 15:18

    This is slightly easier and more elegant way.

    library(shinyBS) # Additional Bootstrap Controls
    
    ## From ui.R: Adds a tooltip to element with inputId = "someInput" 
    ## with text, "This is an input.", that appears to the left on hover.
    bsTooltip(id = "someInput", title = "This is an input", 
              placement = "left", trigger = "hover")
    
    ## From server.R: Add the same tooltip as above
    addTooltip(session, id = "someInput", title = "This is an input.",
               placement = "left", trigger = "hover")
    

    You can add the Tooltip in ui.R or server.R, Additional you can also use Popover.

提交回复
热议问题