Skip to content

Delayed color change for invalid colors #10309

@xavfernandez

Description

@xavfernandez

Expected behavior

I would expect the invalid colors to be constant.

Current behavior

When using invalid colors like rgba(267,292,60,0.2) or rgba(560,60,60,1) (with 267 & 560 outside the expected 0-255 range) the color is not "stable" on hover transition and changes twice.

Reproducible sample

https://jsfiddle.net/xafer/86rvbhoj/8/

Optional extra steps/info to reproduce

  • Hover on first bar "A" and exit: the bar A will update its color twice
  • Hover on second bar "B": the bar B will update its color twice during hover

Possible solution

No response

Context

Since this happens with invalid colors the behavior is clearly unspecified but the current behavior is unexpected/surprising (and did not happen with v2.9.3).

chart.js version

v3.7.1

Browser name and version

No response

Link to your project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions