From 255434a7147be670c7ba64f52a9e6769c2d1e07e Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 11 Aug 2022 17:45:46 +0100 Subject: [PATCH] Add colors for Bar and Donut Charts --- packages/client/manifest.json | 84 ++++++++++++++++++- .../src/components/app/charts/BarChart.svelte | 2 +- 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index a60e5c6b15..ac6de1ba39 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -1493,6 +1493,46 @@ "value": "Custom" } }, + { + "type": "color", + "label": "C2", + "key": "c2", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, + { + "type": "color", + "label": "C3", + "key": "c3", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, + { + "type": "color", + "label": "C4", + "key": "c4", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, + { + "type": "color", + "label": "C5", + "key": "c5", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, { "type": "boolean", "label": "Stacked", @@ -1963,8 +2003,48 @@ }, { "type": "color", - "label": "Color", - "key": "color", + "label": "C1", + "key": "c1", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, + { + "type": "color", + "label": "C2", + "key": "c2", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, + { + "type": "color", + "label": "C3", + "key": "c3", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, + { + "type": "color", + "label": "C4", + "key": "c4", + "barSeparator": false, + "dependsOn": { + "setting": "palette", + "value": "Custom" + } + }, + { + "type": "color", + "label": "C5", + "key": "c5", "barSeparator": false, "dependsOn": { "setting": "palette", diff --git a/packages/client/src/components/app/charts/BarChart.svelte b/packages/client/src/components/app/charts/BarChart.svelte index 75c147f5d4..fd8443e2d6 100644 --- a/packages/client/src/components/app/charts/BarChart.svelte +++ b/packages/client/src/components/app/charts/BarChart.svelte @@ -35,7 +35,7 @@ yAxisUnits, palette, horizontal, - c1 ? [c1] : null, + c1 && c2 && c3 && c4 && c5 ? [c1, c2, c3, c4, c5] : null, customColor )