Color widget: add meaningful gradients for numerical variables
- Dominant language
- Python
- Stars
- 5.7k
- Forks
- 1.1k
- Avg merge
- 12d 2h
- Merged PRs (30d)
- 1
Description
**What's your use case?**
There are some widely accepted color conventions that would be useful as a basis for color gradients to visualize numerical variables. In particular, I'm thinking of:
- a transition from red for low numbers to green for high numbers. This makes it easy to interpret scales from bad/wrong to good/correct - for instance review ratings. There is a scale from green to red but in many typical situations this inverse transition doesn't make sense. It does make sense, however, in situations where high values correspond to dangerous or undesirable conditions, e.g., infection rates or strength of earthquakes.
- a transition from blue for low numbers to red for high numbers. This makes it easy to interpret scales from cold/cool to hot/warm, for instance when working with temperatures from weather data.
**What's your proposed solution?**
Several possibilities:
- As with categorical data, make the scales user-configurable by allowing selection of "start color" and "end color" and perhaps points in between
- For each gradient, add the option to invert it (and add a blue-to-red gradient)
- Add some additional, meaningful gradients to the current hard-coded list.
**Are there any alternative solutions?**
In some cases, variables can be discretized and assigned a custom (discretized) color range.
Contributor guide
Research direction
Start by locating the Color widget and reading how numerical-variable gradients are currently defined and selected. Compare the proposed configurable endpoints, inversion, and additional gradients with the existing behavior, then establish which option is required before implementation; done should include a clearly specified gradient behavior and verification for numerical variables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100