From e9f4df02f73358a36eba1edea8d09a84498530d3 Mon Sep 17 00:00:00 2001 From: Emanuel Almeida Date: Sat, 7 Feb 2026 23:05:22 +0000 Subject: [PATCH] fix: remove pie chart, show expense list with total - Remove PieChart (caused empty space above legend) - Show clean category list with colored dots directly - Add total sum row at bottom with separator line Co-Authored-By: Claude Opus 4.6 --- src/pages/Financial.tsx | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/src/pages/Financial.tsx b/src/pages/Financial.tsx index 0bbeea6..81ffc05 100644 --- a/src/pages/Financial.tsx +++ b/src/pages/Financial.tsx @@ -3,7 +3,6 @@ import { motion } from 'framer-motion' import { Link } from 'react-router-dom' import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend, - PieChart, Pie, Cell, } from 'recharts' import { Zap, @@ -257,38 +256,13 @@ export default function Financial() { - {/* Pie Chart - Expense Distribution */} + {/* Expense Distribution */} -

+

Despesas por Categoria

-
- - - - {data.categorias.slice(0, 10).map((_, i) => ( - - ))} - - formatEUR(value || 0)} - contentStyle={{ background: '#18181b', border: '1px solid rgba(255,255,255,0.1)', borderRadius: 12, fontSize: 13 }} - itemStyle={{ color: '#e4e4e7' }} - /> - - -
- {/* Legend */} -
+
{data.categorias.slice(0, 10).map((cat, i) => (
@@ -299,6 +273,10 @@ export default function Financial() {
))}
+
+ Total + {formatEUR(data.despesas_ano)} +