Skip to content

Commit 8107c6a

Browse files
committed
improve activitygraphcard chart coloring steps
1 parent 6dc517e commit 8107c6a

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

resources/js/Components/Dashboard/ActivityGraphCard.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,21 @@ const option = computed(() => {
112112
top: 'center',
113113
pieces: [
114114
{ value: 0, color: chartEmptyColor.value },
115-
{ gt: 0, lte: max.value * 0.25, color: chroma.mix(chartEmptyColor.value, chartColor.value, 0.4).hex() },
116-
{ gt: max.value * 0.25, lte: max.value * 0.5, color: chroma.mix(chartEmptyColor.value, chartColor.value, 0.6).hex() },
117-
{ gt: max.value * 0.5, lte: max.value * 0.75, color: chroma.mix(chartEmptyColor.value, chartColor.value, 0.8).hex() },
115+
{
116+
gt: 0,
117+
lte: max.value * 0.25,
118+
color: chroma.mix(chartEmptyColor.value, chartColor.value, 0.3).hex(),
119+
},
120+
{
121+
gt: max.value * 0.25,
122+
lte: max.value * 0.5,
123+
color: chroma.mix(chartEmptyColor.value, chartColor.value, 0.6).hex(),
124+
},
125+
{
126+
gt: max.value * 0.5,
127+
lte: max.value * 0.75,
128+
color: chroma.mix(chartEmptyColor.value, chartColor.value, 0.8).hex(),
129+
},
118130
{ gt: max.value * 0.75, lte: max.value, color: chartColor.value },
119131
],
120132
show: false,

0 commit comments

Comments
 (0)