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

Reset/Unzoom does not work when labelsDiv argument is provided to dyLegend() #247

Open
ghiggi opened this issue Apr 27, 2020 · 0 comments
Open

Comments

@ghiggi
Copy link

ghiggi commented Apr 27, 2020

Here below a reproducible example showing that when 'labelsDiv' argument is provided to dyLegend(), dygraphs does not unzoom anymore when double-clicking the graphic or when pressing the"reset zoom" button.

library(zoo)
library(dygraphs)
library(xts)

# Simulate time series 
ts = zoo(rnorm(100), seq(as.Date("2010-01-01"), by="1 month", length.out=100))
# Div to hide the legend 
noLegendDiv='<div id="dygraphLabelsContainer" style="position:absolute:left:0px;top:0px; visibility:hidden; z-index:-1"></div>'
# Plot time series 
dy <- dygraph(ts, main = "")
dy <- dy %>%
  dyLegend(show = "never",
           labelsDiv = noLegendDiv) %>% 
  dyUnzoom()
dy
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