0

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.

M--
  • 25,431
  • 8
  • 61
  • 93
Ljupcho Naumov
  • 196
  • 2
  • 12

1 Answers1

0

I think this gives the desired output.

lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths) %>%
#  dyBarSeries('fdeaths') %>% 
#  dyFilledLine('mdeaths') %>% 
  dyRangeSelector() 
novica
  • 655
  • 4
  • 11
  • This works on my pc, but I wanted one of the series to plot as bars :/ I ran the dygraphs example code on my work pc and it worked perfectly, no issues. So I guess the issue is due to my R install or pc. – Ljupcho Naumov Nov 11 '19 at 07:19