Plotly rounding timestamps with milliseconds to nearest second
Open
Nobody has claimed this yet.
bug
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
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')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reproducible R example in the issue and compare the plotted x-axis with the millisecond timestamps in the input data. Trace the timestamp handling used by plot_ly for scatter plots; done means timestamps retain millisecond precision instead of being rounded to whole seconds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100