Proxies to show or hide tooltip.
Arguments
- proxy
An echarts4r proxy as returned by
echarts4rProxy
.- ...
Any other option, see showTip.
Examples
if (FALSE) {
library(shiny)
ui <- fluidPage(
fluidRow(
actionButton("show", "Show tooltip"),
actionButton("hide", "Hide tooltip")
),
fluidRow(
echarts4rOutput("plot"),
h3("clicked Data"),
verbatimTextOutput("clickedData"),
h3("clicked Serie"),
verbatimTextOutput("clickedSerie"),
h3("clicked Row"),
verbatimTextOutput("clickedRow")
)
)
server <- function(input, output, session) {
output$plot <- renderEcharts4r({
mtcars |>
e_charts(mpg) |>
e_line(disp, bind = carb, name = "displacement") |>
e_line(hp) |>
e_x_axis(min = 10) |>
e_tooltip(show = FALSE) |>
e_theme("westeros")
})
observeEvent(input$show, {
echarts4rProxy("plot") |>
e_showtip_p(
name = "displacement",
position = list(5, 5)
)
})
observeEvent(input$hide, {
echarts4rProxy("plot") |>
e_hidetip_p()
})
output$clickedData <- renderPrint({
input$plot_clicked_data
})
output$clickedSerie <- renderPrint({
input$plot_clicked_serie
})
output$clickedRow <- renderPrint({
input$plot_clicked_row
})
}
if (interactive()) {
shinyApp(ui, server)
}
}