From feb055d3152b06b0bd1598a9a18f55f1b2bb1c4a Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 02:52:22 +0000 Subject: [PATCH] Rename chart labels Rename income/expense labels to budget/expense in monthly chart. --- src/pages/Analytics.tsx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/pages/Analytics.tsx b/src/pages/Analytics.tsx index 70e23a1..01914b9 100644 --- a/src/pages/Analytics.tsx +++ b/src/pages/Analytics.tsx @@ -24,37 +24,38 @@ const Analytics = () => { color: '#81c784' }]; - // Sample data for the monthly comparison + // Sample data for the monthly comparison - renamed income to budget const monthlyData = [{ name: '3월', - income: 2400000, + budget: 2400000, expense: 1800000 }, { name: '4월', - income: 2300000, + budget: 2300000, expense: 1700000 }, { name: '5월', - income: 2700000, + budget: 2700000, expense: 1900000 }, { name: '6월', - income: 2200000, + budget: 2200000, expense: 1500000 }, { name: '7월', - income: 2500000, + budget: 2500000, expense: 1650000 }, { name: '8월', - income: 2550000, + budget: 2550000, expense: 1740000 }]; - const totalIncome = 2550000; + // Updated variable names to match new terminology + const totalBudget = 2550000; const totalExpense = 1740000; - const savings = totalIncome - totalExpense; - const savingsPercentage = Math.round(savings / totalIncome * 100); + const savings = totalBudget - totalExpense; + const savingsPercentage = Math.round(savings / totalBudget * 100); // Custom formatter for Y-axis that removes currency symbol and uses K format const formatYAxisTick = (value: number) => { @@ -104,7 +105,7 @@ const Analytics = () => { currency: 'KRW', notation: 'compact', maximumFractionDigits: 1 - }).format(totalIncome)} + }).format(totalBudget)}

@@ -146,7 +147,7 @@ const Analytics = () => { - +