From 7fb0cfb41c81226d501b7ae57988d0a91684ccca Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 01:34:35 +0000 Subject: [PATCH] Fix chart display inconsistencies Ensure consistent chart styles across different views, adding cumulative revenue and profit lines with area shading. --- src/components/TransactionChart.tsx | 120 ++++++++++++++++++++++------ 1 file changed, 97 insertions(+), 23 deletions(-) diff --git a/src/components/TransactionChart.tsx b/src/components/TransactionChart.tsx index 236ed20..b153f9b 100644 --- a/src/components/TransactionChart.tsx +++ b/src/components/TransactionChart.tsx @@ -180,7 +180,7 @@ const TransactionChart: React.FC = ({ }; const renderChart = () => { - if (type === 'overview' || type === 'total-revenue' || type === 'total-profit') { + if (type === 'total-revenue') { return ( @@ -192,28 +192,102 @@ const TransactionChart: React.FC = ({ contentStyle={{ backgroundColor: '#1F2937', border: '1px solid #374151' }} /> - {(type === 'overview' || type === 'total-revenue') && ( - - )} - {(type === 'overview' || type === 'total-profit') && ( - - )} + + + + ); + } + + if (type === 'total-profit') { + return ( + + + + + + + + + + ); + } + + if (type === 'overview') { + return ( + + + + + + + + + + ); }