observablehq / observablehq/plot
Waffles can overflow the frame
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
As noted in https://github.com/observablehq/plot/pull/2132#issuecomment-2489891444:
Plot.waffleY([0.5, 2, 4], {x: null, fill: Plot.indexOf}).plot({color: {type: "categorical"}})
Above, the y-scale only extends from [0, 6.5], but the waffle visually extends to y = 7.5… that’s because here each cell of the waffle is 3 y-units tall, as there are three columns. We’d need the waffle mark to provide a hint to the y scale that the domain needs to be taller than the apparent value from the y1 and y2 channels.
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 Plot.waffleY example in the issue and trace how the waffle mark interacts with the y-scale domain, especially the y1 and y2 channels. Done means the scale domain includes the waffle's full visual extent, including the extra height introduced by multiple columns; add or run the relevant mark and scale tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100