From e05aae1c6a2ca72e939a3abe4ffd87bcd0410a38 Mon Sep 17 00:00:00 2001 From: CodexAdrian <83074853+CodexAdrian@users.noreply.github.com> Date: Thu, 26 Oct 2023 10:58:29 -0400 Subject: [PATCH] improve default colors --- docs/components/analytics.md | 1 - lib/components/chart/Chart.vue | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/components/analytics.md b/docs/components/analytics.md index e136bc5ee..3e7adbdf0 100644 --- a/docs/components/analytics.md +++ b/docs/components/analytics.md @@ -86,7 +86,6 @@ }, ]" hide-total - :colors="['#FF0000', '#00FF00', '#0000FF']" suffix="" > Slot for title stuff diff --git a/lib/components/chart/Chart.vue b/lib/components/chart/Chart.vue index 5eb65480c..14447ef59 100644 --- a/lib/components/chart/Chart.vue +++ b/lib/components/chart/Chart.vue @@ -24,7 +24,13 @@ const props = defineProps({ }, colors: { type: Array, - default: () => ['var(--color-brand)'], + default: () => [ + 'var(--color-brand)', + 'var(--color-blue)', + 'var(--color-purple)', + 'var(--color-red)', + 'var(--color-orange)', + ], }, prefix: { type: String, @@ -115,6 +121,15 @@ const chartOptions = ref({ size: 6, }, }, + plotOptions: { + bar: { + columnWidth: '80%', + endingShape: 'rounded', + borderRadius: 5, + borderRadiusApplication: 'end', + borderRadiusWhenStacked: 'last', + }, + }, tooltip: { custom: function ({ series, seriesIndex, dataPointIndex, w }) { console.log(seriesIndex, w)