tooltip_proxy: Tooltip Proxy

Description Usage Arguments Examples

Description

Proxies to show or hide tooltip.

Usage

1
2
3
e_showtip_p(proxy, ...)

e_hidetip_p(proxy)

Arguments

proxy

An echarts4r proxy as returned by echarts4rProxy.

...

Any other option, see showTip.

Examples

 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
50
51
52
53
54
55
56
57
58
59
60
## Not run: 
   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
     })
     
   }
   
   shinyApp(ui, server)

## End(Not run) 

JohnCoene/echarts4r documentation built on Sept. 18, 2019, 2:24 a.m.