Closed kuna-matata closed 8 years ago
This would be something I'd also be very interested to have answered.
Here's a repro: http://jsfiddle.net/eM2Mg/7082/
The chart is displayed fine, you just lose the milliseconds in the axis labels and legend.
Interesting that danvk's example works. I'm running dygraphs through R. Perhaps that's the source of the issue. The following code executed in R reproduces the rounding issue for me:
library(xts) library(dygraphs) r = 5 t = seq(0,2pi,by=0.03) x = rcos(t) y = r*sin(t) t0 = Sys.time() ts = xts(y,t0-unclass(t0)+x) dygraph(ts)
Thanks for the response @danvk . I attempted to get this display working in dygraphs quite a while ago but I could never figure out the correct configuration of axisLabelFormatter and valueFormatter. http://jsfiddle.net/kaliatech/DfWNz/3/
Could you please suggest a workaround that would display milli's in the axis label and legend?
Have anyone figured out how to force dygraphs to not truncate or round the data to seconds and display milliseconds?
Unfortunately I could never get this working. The plotly or highcharter packages handle subsecond plotting much better
It is really too bad dygraph is so much better at downsampling than plotly, but non-fractional second is just a no go for anyone in the finance field :(
Closed by #774
The following three threads discuss handling millisecond time. I got the data to display with R library(dygraphs), but dygraphs.js appears to truncate or round the data to the nearest second. Please consider adding support (or describe how) to resolve fractional seconds.