File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ const props = defineProps<{
3131
3232const { locale } = useI18n ()
3333const colorMode = useColorMode ()
34+ const numberFormatter = useNumberFormatter ({
35+ maximumFractionDigits: 0 ,
36+ })
3437const resolvedMode = shallowRef <' light' | ' dark' >(' light' )
3538const rootEl = shallowRef <HTMLElement | null >(null )
3639const palette = getPalette (' ' )
@@ -153,6 +156,9 @@ const configs = computed(() => {
153156 fontSize: 24 ,
154157 bold: false ,
155158 color: colors .value .fg ,
159+ formatter : ({ value }) => {
160+ return numberFormatter .value .format (value )
161+ },
156162 datetimeFormatter: {
157163 enable: true ,
158164 locale: locale .value ,
Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ function handleModalTransitioned() {
6060}
6161
6262const { fetchPackageDownloadEvolution } = useCharts ()
63- const numberFormatter = useNumberFormatter ()
63+ const numberFormatter = useNumberFormatter ({
64+ maximumFractionDigits: 0 ,
65+ })
6466
6567const { accentColors, selectedAccentColor } = useAccentColor ()
6668
You can’t perform that action at this time.
0 commit comments