Description Usage Arguments Examples
Conceal & reveal tooltips.
1 2 3 | conceal_tooltip(proxy)
reveal_tooltip(proxy, x, y)
|
proxy |
A g2r proxy as returned by |
x, y |
Coordinates of tooltip |
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 | library(shiny)
ui <- fluidPage(
actionButton("hide", "hide"),
actionButton("show", "show"),
g2Output("chart")
)
server <- function(input, output) {
output$chart <- renderG2({
g2(cars, asp(speed, dist)) %>%
fig_point()
})
observeEvent(input$hide, {
g2Proxy("chart") %>%
conceal_tooltip()
})
observeEvent(input$show, {
g2Proxy("chart") %>%
reveal_tooltip(8, 16)
})
}
## Not run: shinyApp(ui, server)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.