rstudio / dygraphs

R interface to dygraphs
http://rstudio.github.io/dygraphs
Other
364 stars 194 forks source link

Bug in alignment between date and numeric data, when using data.frame? #250

Open ugroempi opened 3 years ago

ugroempi commented 3 years ago

Dear dygraphs team,

the simple code dygraph(dat) (after loading the RData file from the attached zip file) shows that the date values in the chart are off by one day (July 19 until August 15 instead of July 20 until August 20). Is this a bug? Can I do anything non-hacky (i.e. not simply increasing the date column by one day) to prevent this from happening?

Best, Ulrike

dat.zip

cphaarmeyer commented 2 years ago

Had the same problem. Seems to be related to timezones. What worked for me is

withr::with_timezone("GMT", dygraphs::dygraph(dat))