Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor error: argument "msg" is missing, with no default #182

Open
helgasoft opened this issue Oct 8, 2024 · 0 comments
Open

Editor error: argument "msg" is missing, with no default #182

helgasoft opened this issue Oct 8, 2024 · 0 comments

Comments

@helgasoft
Copy link

The following code works fine in RStudio, but throws an error in the Editor. Something related to shiny:::flushReact...

# "Add marks" button generates 'Error: argument "msg" is missing, with no default' in https://shinylive.io/r/editor/
library(shiny); library(echarty)
  ui = fluidPage(
    ecs.output("plot"),
    actionButton("add", "Add marks")
  )
  server = function(input, output, session){
    
    output$plot <- ecs.render({
      ec.init( xAxis = list(type='category',
                            data= list('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun')),
          series.param = list( data=list(150, 230, 224, 218, 135, 147, 260), type='line' )
      )
    })
    
    observeEvent(input$add, {
      e <- ecs.proxy("plot")
      e$x$opts$series = list(
        markPoint = list(
          data = list(
            list(coord = c('Tue', 235)), 
            list(coord = c('Fri', 144))
          ),
          itemStyle = list(color='lightblue')
        )
      )
      e$x$opts$yAxis$max <- 500
      e |> ecs.exec('p_merge')
    })
  }
shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant