Skip to content

toWebGL() throws false positive warning in shiny #1569

Closed
@cpsievert

Description

@cpsievert
library(shiny)
library(plotly)

ui <- fluidPage(
  plotlyOutput("plot"),
  verbatimTextOutput("event")
)

server <- function(input, output) {
  
  output$plot <- renderPlotly({
    p <- toWebGL(plot_ly(mtcars, x = ~mpg, y = ~wt))
    print(plotly_json(p))
    p
  })
  
  output$event <- renderPrint({
    d <- event_data("plotly_hover")
    if (is.null(d)) "Hover on a point!" else d
  })
}

shinyApp(ui, server)
Warning in verify_webgl(p) :
  The following traces don't have a WebGL equivalent: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions