dygraphs icon indicating copy to clipboard operation
dygraphs copied to clipboard

Shiny click htmlwidget only returns one time series

Open zkabat opened this issue 8 years ago • 5 comments

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'?

zkabat avatar Sep 28 '17 16:09 zkabat

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

EhsonGhandehari avatar Oct 24 '17 22:10 EhsonGhandehari

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

przmv avatar Oct 24 '17 23:10 przmv

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)

K-lone avatar Dec 01 '17 05:12 K-lone

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

MohoWu avatar Nov 16 '18 16:11 MohoWu

The bug still exist :(

Jensxy avatar Jan 21 '20 10:01 Jensxy