Fix commission rate formatting

This commit is contained in:
Techno Freak 2024-01-29 17:30:00 +03:00
parent 38d741ffee
commit 9e34c476c4

View File

@ -91,7 +91,7 @@ const chartConfig = computed(() => {
offsetY: -15, offsetY: -15,
fontWeight: 500, fontWeight: 500,
fontSize: '2.125rem', fontSize: '2.125rem',
formatter: (value: unknown) => `${rate.value}%`, formatter: (value: unknown) => `${rate.value.toFixed(0)}%`,
color: primaryText, color: primaryText,
}, },
total: { total: {
@ -99,7 +99,7 @@ const chartConfig = computed(() => {
label: 'Commission Rate', label: 'Commission Rate',
fontSize: '1rem', fontSize: '1rem',
color: secondaryText, color: secondaryText,
formatter: () => `${rate.value}%`, formatter: () => `${rate.value.toFixed(0)}%`,
}, },
}, },
}, },
@ -130,7 +130,7 @@ const chartConfig = computed(() => {
<div class="flex items-center justify-center flex-wrap gap-x-3"> <div class="flex items-center justify-center flex-wrap gap-x-3">
<div class="flex items-center gap-x-2"> <div class="flex items-center gap-x-2">
<div class="bg-success w-[6px] h-[6px] rounded-full"></div> <div class="bg-success w-[6px] h-[6px] rounded-full"></div>
<span class="text-caption">Rate:{{ rate }}%</span> <span class="text-caption">Rate:{{ rate.toFixed(0) }}%</span>
</div> </div>
<div class="flex items-center gap-x-2"> <div class="flex items-center gap-x-2">
<div class="bg-success w-[6px] h-[6px] rounded-full opacity-60"></div> <div class="bg-success w-[6px] h-[6px] rounded-full opacity-60"></div>