fix: count format.

This commit is contained in:
Darshan committed 2025-01-29 18:05:11 +05:30
1 parent a72a538030
commit 562ef2387c
1 file changed
+3 -1
+3 -1
View File
@@ -8,6 +8,7 @@
<script lang="ts">
import { Colors } from '$lib/charts/config';
import { Status } from '$lib/components';
import { formatNumberWithCommas } from '$lib/helpers/numbers';
export let legendData: LegendData[] = [];
@@ -16,8 +17,9 @@
<div class="u-flex u-cross-center u-gap-16">
{#each legendData as { name, value }, index}
{@const formattedValue = typeof value === 'number' ? formatNumberWithCommas(value) : value}
<Status status="none" statusIconStyle="background-color: {colors[index % colors.length]}">
{name} ({value})
{name} ({formattedValue})
</Status>
{/each}
</div>