-
-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Description
Hello, I used the example from the Proxies page, but modified it to change the color of the points instead of adding a line.
library(shiny)
library(echarts4r)
# phoney data
df <- data.frame(
x = 1:100,
y = runif(100),
z = runif(100)
)
ui <- fluidPage(
actionButton("add", "Add z serie"), # button
echarts4rOutput("chart")
)
server <- function(input, output){
output$chart <- renderEcharts4r({
e_charts(df, x) |>
e_scatter(y, z)
})
observeEvent(input$add, {
echarts4rProxy("chart", data = df, x = x) |> # create a proxy
e_color("red") |>
e_execute()
})
}
shinyApp(ui, server)This returns an error:
Warning: Error in !: invalid argument type
whereas adding e_color outside the shiny environment works well:
e_charts(df, x) |>
e_scatter(y, z) |>
e_color("red")Metadata
Metadata
Assignees
Labels
No labels