Dygraphs - more advanced plots are not showing

361 views Asked by At

When I plot basic graphs there aren't any issues, however when I try to plot something like dyBarSeries(), it plots the points on the graph and shows them when I pass with the cursor, however no barplots are generated.

Here is a reproducible example taken straight from the dygraphs for R GitHub pages:

lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths) %>%
  dyRangeSelector() %>%
  dyBarSeries('fdeaths') %>% 
  dyFilledLine('mdeaths')

I am supposed to get this:

regular dygraph

But instead I get this:

my dygraph

What can be causing this? I also tried rstudio.cloud to check whether it was my R installation and packages, and I got the same results. However, when ran the example code from my work computer and had no issues, worked flawlessly. The problem should be local to my R install or PC, but I had the same issues on rstudio.cloud.

1

There are 1 answers

1
novica On

I think this gives the desired output.

lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths) %>%
#  dyBarSeries('fdeaths') %>% 
#  dyFilledLine('mdeaths') %>% 
  dyRangeSelector()