🐛 Fix charts displaying using default colours

pull/440/head
James Panther 2023-01-14 14:21:53 +11:00
parent 3bfc6ae439
commit b9bb291a8d
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Appearance switcher missing `aria-label` ([#438](https://github.com/jpanther/congo/pull/438)) - Appearance switcher missing `aria-label` ([#438](https://github.com/jpanther/congo/pull/438))
- Article links missing `alt` text and `aria-label` ([#439](https://github.com/jpanther/congo/pull/439)) - Article links missing `alt` text and `aria-label` ([#439](https://github.com/jpanther/congo/pull/439))
- Figure shortcode would not apply `class` or `href` attribtues in some cases - Figure shortcode would not apply `class` or `href` attribtues in some cases
- Charts displaying with incorrect theme colours
## [2.4.2] - 2022-11-22 ## [2.4.2] - 2022-11-22

View File

@ -3,6 +3,7 @@ function css(name) {
} }
Chart.defaults.font.size = 14; Chart.defaults.font.size = 14;
Chart.defaults.plugins.colors.enabled = false;
Chart.defaults.backgroundColor = css("--color-primary-300"); Chart.defaults.backgroundColor = css("--color-primary-300");
Chart.defaults.elements.point.borderColor = css("--color-primary-400"); Chart.defaults.elements.point.borderColor = css("--color-primary-400");
Chart.defaults.elements.bar.borderColor = css("--color-primary-500"); Chart.defaults.elements.bar.borderColor = css("--color-primary-500");