Skip to content

backgroundColor not working in defaults #11914

@teodorachiosa

Description

@teodorachiosa

Expected behavior

backgroundColor should work, just like adding a backgroundColor to the datasets
E.g.
Chart.defaults.backgroundColor = ['#ff0000', '#00ff00'];

Current behavior

backgroundColor set in defaults does nothing

Reproducible sample

https://codepen.io/teodorachiosa/pen/rNXOZwz?editors=1010

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.4.4

Browser name and version

Chrome 129.0.6668.59

Link to your project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions