rstudio / dygraphs

R interface to dygraphs
http://rstudio.github.io/dygraphs
Other
365 stars 194 forks source link

Shiny click htmlwidget only returns one time series #182

Open zkabat opened 6 years ago

zkabat commented 6 years ago

When accessing dygraph object in shiny via input$plotName_click, it only returns the y coordinates and series.name for the first time series in the plotted xts object. Is it possible to generalize this functionality to work with multiple time series'?

EhsonGhandehari commented 6 years ago

@zkabat Thanks for the comment. I came across the same issue. Were you able to fix the issue? Any update on this?

przmv commented 6 years ago

Could you please provide a Minimal, Complete, and Verifiable example? Thanks!

K-lone commented 6 years ago

I have the same behaviour, here an example:

ui <- fluidPage(
  dygraphOutput("plot"),
  verbatimTextOutput("text3")) 

server <- function(input, output,session) ({
    x <- 1:10
    y1 <- abs(rnorm(10)*5)
    y2 <- abs(rnorm(10)*5)
    table <- data.frame(x, y1, y2, stringsAsFactors = FALSE)

output$plot <- renderDygraph({dygraph(table)})
output$text3 <- renderPrint(input$plot_click)
})

app <- shinyApp(ui, server)

runApp(app)
MohoWu commented 5 years ago

This is definitely a bug. Hopefully the package maintainer will be able to fix it soon.

Jensxy commented 4 years ago

The bug still exist :(