Annotated Heatmap: automatic font color

Open
#485 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
fsharp

Research direction

Start by reading the AnnotatedHeatmap implementation and the annotated heatmap documentation/example linked in the issue, then compare the contrast behavior discussed in plotly.py issue 1300. Determine where annotation font color can account for cell values and finish when annotated text remains readable across the heatmap colors.

Written by the indexing model from the issue text.

Description

Given an annotated heatmap I would expect the cell text to contrast with the cell color.
(Not doing so leads to the readability issues in the current documentation/example of Annotated Heatmap: https://plotly.net/simple-charts/heatmaps.html)

A good contrast is shown and discussed on the python side of plotly: https://github.com/plotly/plotly.py/issues/1300

When I did not find a way to do that, I looked at the implementation of AnnotatedHeatmap.
Here the configuration of the annotations is not dependent on the actual cell values - I could only apply a workaround of setting a background color.
I did not find/check the actual layouting step if there is a better place to compute correct font color.

Dominant language
F#
Stars
860
Forks
99
Avg merge
22m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

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.NET

All issues in plotly/Plotly.NET

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.