Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fractional second handling (millisecond time) #654

Closed
kuna-matata opened this issue Aug 30, 2015 · 8 comments
Closed

Fractional second handling (millisecond time) #654

kuna-matata opened this issue Aug 30, 2015 · 8 comments
Labels

Comments

@kuna-matata
Copy link

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.

@TonyDIRL
Copy link

TonyDIRL commented Sep 7, 2015

This would be something I'd also be very interested to have answered.

@danvk
Copy link
Owner

danvk commented Sep 28, 2015

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.

@danvk danvk added the bug label Sep 28, 2015
@kuna-matata
Copy link
Author

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)

@TonyDIRL
Copy link

TonyDIRL commented Oct 7, 2015

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?

@hallegue
Copy link

Have anyone figured out how to force dygraphs to not truncate or round the data to seconds and display milliseconds?

@TonyDIRL
Copy link

Unfortunately I could never get this working. The plotly or highcharter packages handle subsecond plotting much better

@statquant
Copy link

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 :(

@danvk
Copy link
Owner

danvk commented Sep 15, 2016

Closed by #774

@danvk danvk closed this as completed Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants