From ebb5e4931f99e2a5b08992d5361688baa4bfb0a8 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:32:14 +0000 Subject: [PATCH] Refactor: Improve transaction chart visualizations The AI has updated the transaction charts to match the total revenue chart's style, implementing specific display rules for different chart types (job, cost, revenue, profit) including cumulative values, shaded areas, and line representations. --- src/components/TransactionChart.tsx | 127 ++++++++++------------------ 1 file changed, 47 insertions(+), 80 deletions(-) diff --git a/src/components/TransactionChart.tsx b/src/components/TransactionChart.tsx index 0e61c36..236ed20 100644 --- a/src/components/TransactionChart.tsx +++ b/src/components/TransactionChart.tsx @@ -232,21 +232,20 @@ const TransactionChart: React.FC = ({ - + ); } @@ -265,28 +264,27 @@ const TransactionChart: React.FC = ({ - + ); } - // Combined profit chart (costs, revenue, profit) + // Profit chart - entire job view return ( - + @@ -295,63 +293,32 @@ const TransactionChart: React.FC = ({ labelStyle={{ color: '#F3F4F6' }} contentStyle={{ backgroundColor: '#1F2937', border: '1px solid #374151' }} /> - toggleLine(e.dataKey as string)} - wrapperStyle={{ cursor: 'pointer' }} + + - {!hiddenLines.has('costs') && ( - - )} - {!hiddenLines.has('revenue') && ( - - )} - {!hiddenLines.has('profit') && ( - - )} - {!hiddenLines.has('cumulativeRevenue') && ( - - )} - {!hiddenLines.has('cumulativeProfit') && ( - - )} - + + + ); };