dygraphs icon indicating copy to clipboard operation
dygraphs copied to clipboard

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

Open ugroempi opened this issue 5 years ago • 1 comments

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

ugroempi avatar Aug 17 '20 10:08 ugroempi

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

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

cphaarmeyer avatar Sep 27 '21 15:09 cphaarmeyer