observablehq / observablehq/plot
Allow date strings when using time intervals
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
I came across the behavior shown in this notebook, where plotting date strings on a utc scale ceases to work if the scale additionally has an interval property.
Plot.dotX(dates).plot({ x: { type: "utc" } }) // dots are rendered
Plot.dotX(dates).plot({ x: { type: "utc", interval: d3.utcDay } }) // dots are not rendered
According to the docs time scales coerce channel values to dates, so I think the first chart is right, and there might be something weird happening when the interval option gets involved.
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 with the Observable notebook reproduction using Plot.dotX, a utc scale, and d3.utcDay as the interval. Trace the utc scale behavior when interval is present and verify that date-string channel values render in both examples; done means the interval-enabled plot displays the dots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- d3js, javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100