From b9bb291a8d68df4625cd9ea0c4e6c7544670df31 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Sat, 14 Jan 2023 14:21:53 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20charts=20displaying=20usin?= =?UTF-8?q?g=20default=20colours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + assets/js/chart.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51501a6c..b2bf4516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) - 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 +- Charts displaying with incorrect theme colours ## [2.4.2] - 2022-11-22 diff --git a/assets/js/chart.js b/assets/js/chart.js index ccf950d4..352a563d 100644 --- a/assets/js/chart.js +++ b/assets/js/chart.js @@ -3,6 +3,7 @@ function css(name) { } Chart.defaults.font.size = 14; +Chart.defaults.plugins.colors.enabled = false; Chart.defaults.backgroundColor = css("--color-primary-300"); Chart.defaults.elements.point.borderColor = css("--color-primary-400"); Chart.defaults.elements.bar.borderColor = css("--color-primary-500");