plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

Plotly rounding timestamps with milliseconds to nearest second

Open LockStoch opened this issue 5 years ago • 1 comments

When plotting a time-series with milliseconds, Plotly rounds the data on the x-axis to the nearest second.

x <- seq(1, 10000, by=250)/1000
y <- 1:length(x)
x <- as.POSIXct(x, origin='1970-01-01', tz='UTC')
data <- data.frame(x, y)
plot_ly(data, x=~x, y=~y, type='scatter', mode='lines+markers')

See another example here.

LockStoch avatar Apr 25 '20 05:04 LockStoch

Is this a limitation in the JS library ? Or is it one from R?

neovom avatar Nov 08 '24 12:11 neovom