From e6fc0dcf1534650cdcdcfd32bdd0f2624c0d4130 Mon Sep 17 00:00:00 2001 From: xds Date: Thu, 11 Dec 2025 22:51:38 +0300 Subject: [PATCH] feat: improve percentage change display with dynamic colors and width adjustments. --- src/components/dashboard/DashboardCharts.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/dashboard/DashboardCharts.vue b/src/components/dashboard/DashboardCharts.vue index 940523f..d552cb7 100644 --- a/src/components/dashboard/DashboardCharts.vue +++ b/src/components/dashboard/DashboardCharts.vue @@ -199,14 +199,15 @@ const weeklyChartOptions = computed(() => {
+ class="flex items-center text-sm gap-1 text-surface-500 dark:text-surface-400 w-10 text-right !w-full">
{{ category.percentage }} %
- ({{ - category.changeDiffPercentage > 0 ? '+' : category.changeDiffPercentage < 0 ? '-' : '' + - Math.round(category.changeDiffPercentage) }}) + ({{ + (category.changeDiffPercentage > 0 ? '+' : '') + Math.round(category.changeDiffPercentage) + }}%)