Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FEATURE]: Heatmap with custom colour for NaN values

Open
#7,817 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript

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.

Description

enhancement feature P3 size: 1
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.

Dominant language
JavaScript
Stars
18.4k
Forks
2k
Avg merge
1d 17h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plotly/plotly.js

All issues in plotly/plotly.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.