Remove Serie
Remove a serie by name or precising its index.
e_remove_serie_p(proxy, serie_name = NULL, serie_index = NULL) e_remove_serie(proxy, serie_name = NULL, serie_index = NULL)
proxy |
An echarts4r proxy as returned by |
serie_name |
Name of serie to remove. |
serie_index |
Index of serie to append to (starts from 0). |
library(shiny) ui <- fluidPage( actionButton("rm", "Remove z serie"), echarts4rOutput("plot") ) server <- function(input, output, session) { data <- data.frame( x = rnorm(10, 5, 3), y = rnorm(10, 50, 12), z = rnorm(10, 50, 5) ) output$plot <- renderEcharts4r({ data %>% e_charts(x) %>% e_scatter(y) %>% e_scatter(z) }) observeEvent(input$rm, { echarts4rProxy("plot") %>% e_remove_serie_p(serie_name = "z") }) } ## Not run: shinyApp(ui, server) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.