observablehq / observablehq/plot
The differenceY mark should support the interval option
Open
Nobody has claimed this yet.
bug
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
Because it doesn’t, it doesn’t align with areaY and lineY…
Plot.plot({
marks: [
Plot.lineY(data, { x: "year", y: "value", interval: 1 }),
Plot.differenceY(data, { x: "year", y: "value", interval: 1 }),
Plot.areaY(data, { x: "year", y: "value", interval: 1, fillOpacity: 0.2 })
]
})
data = [{"year":1995,"value":0.2},{"year":1996,"value":-0.5},{"year":1997,"value":-0.6},{"year":1998,"value":0.9},{"year":1999,"value":0},{"year":2000,"value":-0.6},{"year":2001,"value":0.1},{"year":2002,"value":0.4},{"year":2003,"value":0.6},{"year":2004,"value":-0.1},{"year":2005,"value":0.7},{"year":2006,"value":-0.4},{"year":2007,"value":0.7},{"year":2008,"value":-0.6},{"year":2009,"value":-0.3},{"year":2010,"value":0.3},{"year":2011,"value":-0.4},{"year":2012,"value":-0.2},{"year":2013,"value":0.8},{"year":2014,"value":0}]
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 reproducing the supplied Plot.plot example with interval: 1, then compare how differenceY handles the option with areaY and lineY. The work is done when differenceY supports interval and aligns with the other marks in the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100