From 555519ee343275369ed3567fe74360ebd435b001 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Sun, 15 Sep 2024 14:56:28 +0200 Subject: [PATCH] fix blue color in charts --- CHANGELOG.md | 1 + sqlpage/apexcharts.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfe3e746..8df85575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - **Important note**: this version removes support for the `SET $variable = ...` syntax in SQLite. This worked only with some databases. You should replace all occurrences of this syntax with `SET variable = ...` (without the `$` prefix). - slightly reduce the margin at the top of pages to make the content appear higher on the screen. - fix the display of the page title when it is long and the sidebar display is enabled. + - Fix an issue where the color name `blue` could not be used in the chart component. ## 0.28.0 (2024-08-31) - Chart component: fix the labels of pie charts displaying too many decimal places. diff --git a/sqlpage/apexcharts.js b/sqlpage/apexcharts.js index e5852fb0..fe3be8f0 100644 --- a/sqlpage/apexcharts.js +++ b/sqlpage/apexcharts.js @@ -3,7 +3,7 @@ function sqlpage_chart() { - const tblrColors = Object.fromEntries(['azure', 'red', 'lime', 'purple', 'yellow', 'gray-600', 'orange', 'pink', 'teal', 'indigo', 'cyan', 'green', 'blue-lt', 'yellow-lt', 'pink-lt', 'green-lt', 'orange-lt', 'gray-500', 'gray-400', 'gray-300', 'gray-200', 'gray-100', 'gray-50', 'black'] + const tblrColors = Object.fromEntries(['azure', 'red', 'lime', 'purple', 'yellow', 'gray-600', 'orange', 'pink', 'teal', 'indigo', 'cyan', 'green', 'blue-lt', 'yellow-lt', 'pink-lt', 'green-lt', 'orange-lt', 'blue', 'gray-500', 'gray-400', 'gray-300', 'gray-200', 'gray-100', 'gray-50', 'black'] .map(c => [c, getComputedStyle(document.documentElement).getPropertyValue('--tblr-' + c)])); /** @typedef { { [name:string]: {data:{x:number,y:number}[], name:string} } } Series */