Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
improve default colors
Browse files Browse the repository at this point in the history
  • Loading branch information
CodexAdrian committed Oct 26, 2023
1 parent a1926a9 commit e05aae1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/components/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
},
]"
hide-total
:colors="['#FF0000', '#00FF00', '#0000FF']"
suffix="<svg xmlns='http://www.w3.org/2000/svg' class='h-6 w-6' fill='none' viewBox='0 0 24 24' stroke='currentColor' stroke-width='2'><path stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4' /></svg>"
>
Slot for title stuff
Expand Down
17 changes: 16 additions & 1 deletion lib/components/chart/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e05aae1

Please sign in to comment.