Dynamic Color: generateColor: returned callback should have context
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
We encountered a case where we needed to generate multiple (rotated bar) charts with different colors for the same column. The color was dependent on metadata outside of the data in column (i.e in another column, whose display is suppressed).
The lack of context makes it cumbersome to reference outside data in the callback. There are other callback defined across C3 which do have the context passed in. So there is no hard in adding it, only potential benefits
Contributor guide
Research direction
Locate the generateColor callback implementation in C3's chart color path and compare it with the other callbacks that already receive context. Trace how the callback is invoked for a column, then verify that context can expose metadata from outside the displayed column. Done means the returned callback receives the needed context without breaking existing color behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100