File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ function setIsZoom({ isZoom }: { isZoom: boolean }) {
7474const { width } = useElementSize (rootEl )
7575
7676const compactNumberFormatter = useCompactNumberFormatter ()
77+ const integerFormatter = useNumberFormatter ({
78+ maximumFractionDigits: 0 ,
79+ })
7780
7881onMounted (async () => {
7982 rootEl .value = document .documentElement
@@ -1541,7 +1544,10 @@ const chartConfig = computed<VueUiXyConfig>(() => {
15411544 .map ((d : Record <string , any >) => {
15421545 const label = String (d ?.name ?? ' ' ).trim ()
15431546 const raw = Number (d ?.value ?? 0 )
1544- const v = compactNumberFormatter .value .format (Number .isFinite (raw ) ? raw : 0 )
1547+ const v =
1548+ raw > 1_000
1549+ ? compactNumberFormatter .value .format (Number .isFinite (raw ) ? raw : 0 )
1550+ : integerFormatter .value .format (Number .isFinite (raw ) ? raw : 0 )
15451551
15461552 if (! hasMultipleItems ) {
15471553 // We don't need the name of the package in this case, since it is shown in the xAxis label
You can’t perform that action at this time.
0 commit comments