chartjs / chartjs/Chart.js

Scales defaults for "grid.color" and "ticks.color" not updating

Open
#11,910 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

Just like the legend and tooltip color, I expect the scale colors to be updated when the color changes.

### Current behavior

The scale grid color and ticks color only update once. Updating the chart (`chart.update()`) doesn't trigger the color changes.

### Reproducible sample

https://codepen.io/teodorachiosa/pen/yLmNPMy

### Optional extra steps/info to reproduce

_No response_

### Possible solution

_No response_

### Context

We use a theme switcher to change between a light and a dark mode. We needs to update the defaults when the theme changes.

### chart.js version

4.4.4

### Browser name and version

Chromium: 129.0.6668.70 (Official Build) (64-bit)

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.