Skip to content

Commit bdc034f

Browse files
committed
feat(dashboard): add NumberFlow component and Chart
1 parent 135280e commit bdc034f

File tree

8 files changed

+140
-240
lines changed

8 files changed

+140
-240
lines changed
File renamed without changes.

components/ui/chart-area/AreaChart.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
113113
:tick-format="xFormatter ?? ((v: number) => data[v]?.[index])"
114114
:grid-line="false"
115115
:tick-line="false"
116-
tick-text-color="hsl(var(--vis-text-color))"
116+
tick-text-color="hsl(var(--muted-foreground))"
117117
/>
118118
<VisAxis
119119
v-if="showYAxis"
@@ -127,7 +127,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
127127
class: 'text-muted',
128128
},
129129
}"
130-
tick-text-color="hsl(var(--vis-text-color))"
130+
tick-text-color="hsl(var(--muted-foreground))"
131131
/>
132132

133133
<slot />

components/ui/chart-bar/BarChart.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const selectorsBar = computed(() => props.type === 'grouped' ? GroupedBar.select
9292
:tick-format="xFormatter ?? ((v: number) => data[v]?.[index])"
9393
:grid-line="false"
9494
:tick-line="false"
95-
tick-text-color="hsl(var(--vis-text-color))"
95+
tick-text-color="hsl(var(--muted-foreground))"
9696
/>
9797
<VisAxis
9898
v-if="showYAxis"
@@ -106,7 +106,7 @@ const selectorsBar = computed(() => props.type === 'grouped' ? GroupedBar.select
106106
class: 'text-muted',
107107
},
108108
}"
109-
tick-text-color="hsl(var(--vis-text-color))"
109+
tick-text-color="hsl(var(--muted-foreground))"
110110
/>
111111

112112
<slot />

components/ui/chart-line/LineChart.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
8282
:tick-format="xFormatter ?? ((v: number) => data[v]?.[index])"
8383
:grid-line="false"
8484
:tick-line="false"
85-
tick-text-color="hsl(var(--vis-text-color))"
85+
tick-text-color="hsl(var(--muted-foreground))"
8686
/>
8787
<VisAxis
8888
v-if="showYAxis"
@@ -96,7 +96,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
9696
class: 'text-muted',
9797
},
9898
}"
99-
tick-text-color="hsl(var(--vis-text-color))"
99+
tick-text-color="hsl(var(--muted-foreground))"
100100
/>
101101

102102
<slot />

components/ui/chart/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function defaultColors(count: number = 3) {
1010
const primaryCount = quotient + remainder
1111
const secondaryCount = quotient
1212
return [
13-
...Array.from(Array.from({ length: primaryCount }).keys()).map(i => `hsl(var(--vis-primary-color) / ${1 - (1 / primaryCount) * i})`),
13+
...Array.from(Array.from({ length: primaryCount }).keys()).map(i => `hsl(var(--primary) / ${1 - (1 / primaryCount) * i})`),
1414
...Array.from(Array.from({ length: secondaryCount }).keys()).map(i => `hsl(var(--vis-secondary-color) / ${1 - (1 / secondaryCount) * i})`),
1515
]
1616
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
},
4646
"dependencies": {
4747
"@internationalized/date": "^3.6.0",
48+
"@number-flow/vue": "^0.4.3",
4849
"@tanstack/vue-table": "^8.20.5",
4950
"@unovis/ts": "^1.5.0",
5051
"@unovis/vue": "^1.5.0",

0 commit comments

Comments
 (0)