dygraphs icon indicating copy to clipboard operation
dygraphs copied to clipboard

Implement option `visibility` to toggle series visibility on/off

Open danielkrizian opened this issue 9 years ago • 3 comments

This is just an enhancement/feature request to implement existing JavaScript visibility option:

From http://dygraphs.com/tests/visibility.html :

new Dygraph(
            document.getElementById("div_g"),
            NoisyDataABC, {
              rollPeriod: 7,
              errorBars: true,
              visibility: [false, true, true]
            }
          );

In R dygraphs it doesn't work yet:

library(dygraphs)

lungDeaths <- cbind(ldeaths, mdeaths, fdeaths)
dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") %>%
  dyOptions(visibility=c(TRUE,FALSE, TRUE))

Should be also a per-series option:

dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") %>%
  dySeries(name='mdeaths", visibility=FALSE)

Thank you

danielkrizian avatar Jun 27 '15 13:06 danielkrizian