Skip to content

Commit 6dc517e

Browse files
committed
make sure days with low tracked time are clearly distinguished from no time in activity graph, fixes #447
1 parent 2c60d04 commit 6dc517e

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

resources/js/Components/Dashboard/ActivityGraphCard.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,17 @@ const option = computed(() => {
106106
return {
107107
tooltip: {},
108108
visualMap: {
109-
min: 0,
110-
max: max.value,
111109
type: 'piecewise',
112110
orient: 'horizontal',
113111
left: 'center',
114112
top: 'center',
115-
inRange: {
116-
color: [chartEmptyColor.value, chartColor.value],
117-
},
113+
pieces: [
114+
{ 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() },
118+
{ gt: max.value * 0.75, lte: max.value, color: chartColor.value },
119+
],
118120
show: false,
119121
},
120122
calendar: {

0 commit comments

Comments
 (0)