observablehq / observablehq/plot
shorthand for scale type and color scheme
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
I want to be able to say
color: "blues"
as shorthand for
color: {scheme: "blues"}
and likewise I could imagine
y: "sqrt"
as shorthand for
y: {type: "sqrt"}
Basically for any scale option that’s defined as a string, we check if it’s a valid scale type. And for color, we also check if it’s a valid color scheme. (These sets should be non-overlapping.) We do something similar for the projection option in #1111 and it’s nice.
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 tracing how scale options and color schemes are interpreted, using the examples in this issue and the projection shorthand discussed in #1111 as comparison points. Done means valid string scale types are accepted as {type: ...}, valid color schemes as {scheme: ...}, and existing option behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100