Skip to content

Annotated Heatmap: automatic font color #485

Description

@u3r

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: plotly/plotly.py#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions