Skip to content

Commit ef819d1

Browse files
authored
fix(i18n): format sparkline data label (#2519)
1 parent 4e8c727 commit ef819d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function handleModalTransitioned() {
6060
}
6161
6262
const { fetchPackageDownloadEvolution } = useCharts()
63+
const numberFormatter = useNumberFormatter()
6364
6465
const { accentColors, selectedAccentColor } = useAccentColor()
6566
@@ -359,6 +360,9 @@ const config = computed<VueUiSparklineConfig>(() => {
359360
fontSize: 28,
360361
bold: false,
361362
color: colors.value.fg,
363+
formatter: ({ value }) => {
364+
return numberFormatter.value.format(value)
365+
},
362366
},
363367
line: {
364368
color: colors.value.borderHover,

0 commit comments

Comments
 (0)