Description Usage Arguments Examples
Tooltip with text that appears on hover over an element.
1 | wired_tooltip(id, text, position = c("left", "right", "top", "bottom"))
|
id |
Id of the element the tooltip is for. |
text |
Text in the tooltip. |
position |
Postion where tolltip will appear. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ## Not run:
if (interactive()) {
library(shiny)
library(wired)
ui <- fluidPage(
fluidRow(
column(
width = 4,
wired_slider(
inputId = "n",
label = "Number of obs. :",
min = 50, value = 100, max = 300,
radius = 10
),
wired_tooltip(
id = "n",
text = "This is a slider !",
position = "right"
)
),
column(
width = 8,
plotOutput("plot"),
wired_tooltip(
id = "plot",
text = "And a plot !",
position = "bottom"
)
)
)
)
server <- function(input, output, session) {
output$plot <- renderPlot({
plot(sin(seq(from = pi, by = 0.05, length.out = input$n)))
})
}
shinyApp(ui, server)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.