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
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.