From a2b8d476b2dc9ca0826bc8fa97ee0fb089d6bb6e Mon Sep 17 00:00:00 2001 From: CCS Admin Date: Thu, 26 Feb 2026 20:42:03 +0000 Subject: [PATCH] fix: hide Fallgruppen with 0 entries from pie chart Co-Authored-By: Claude Opus 4.6 --- frontend/src/pages/DashboardPage.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/DashboardPage.tsx b/frontend/src/pages/DashboardPage.tsx index 99f545a..3bdfd97 100644 --- a/frontend/src/pages/DashboardPage.tsx +++ b/frontend/src/pages/DashboardPage.tsx @@ -33,10 +33,12 @@ export function DashboardPage() { const { data, isLoading: loading } = useDashboard(jahr) const fallgruppenData = data - ? Object.entries(data.kpis.fallgruppen).map(([key, value]) => ({ - name: FALLGRUPPEN_LABELS[key] || key, - value, - })) + ? Object.entries(data.kpis.fallgruppen) + .filter(([, value]) => value > 0) + .map(([key, value]) => ({ + name: FALLGRUPPEN_LABELS[key] || key, + value, + })) : [] const years = Array.from({ length: 5 }, (_, i) => currentYear - i)