Skip to content

Commit 15f2845

Browse files
committed
fix(i18n): format compare sparkline data labels
1 parent 0ca1692 commit 15f2845

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/components/Chart/SplitSparkline.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const props = defineProps<{
3131
3232
const { locale } = useI18n()
3333
const colorMode = useColorMode()
34+
const numberFormatter = useNumberFormatter()
3435
const resolvedMode = shallowRef<'light' | 'dark'>('light')
3536
const rootEl = shallowRef<HTMLElement | null>(null)
3637
const palette = getPalette('')
@@ -153,6 +154,9 @@ const configs = computed(() => {
153154
fontSize: 24,
154155
bold: false,
155156
color: colors.value.fg,
157+
formatter: ({ value }) => {
158+
return numberFormatter.value.format(value)
159+
},
156160
datetimeFormatter: {
157161
enable: true,
158162
locale: locale.value,

0 commit comments

Comments
 (0)