[FEATURE]: Heatmap with custom colour for NaN values
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Description
Currently, z-values of NaN get rendered as transparent in heatmaps. Adding a new parameter nancolor to the heatmap would fix this by allowing users to set a specific colour for NaN values.
Why should this feature be added?
Biomedical data often contains missing values, visualising them explicitly within heatmaps (i.e. without imputation or defaulting to transparent which often visually clashes with the used colour scales) allows for proper communication of the data.
Mocks/Designs
See #1170
Notes
This feature has already been requested in in #975 and a PR with the necessary changes had previously been opened in #1170. While a workaround has been suggested, I believe this could hurt performance for large heatmaps and a new parameter would be more clean. Since the issue is still of concern, I created this new issue as requested here.
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 the heatmap rendering entry point in plotly.js and reviewing the prior implementation discussed in #1170. Confirm how NaN z-values are currently rendered, then define coverage showing that a supplied nancolor is applied without changing normal heatmap colors or behavior.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100