Skip to content

Plotly rounding timestamps with milliseconds to nearest second #1753

Open
@LockStoch

Description

@LockStoch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions