[fix] negodata/front: 통계 카테고리별 절감 차트 -> 손해(음수)는 안보이게, 대시보드에서 일반관리자도 회사 통계 보이게 수정

This commit is contained in:
minaChoi committed 2026-07-10 15:58:13 +09:00
1 parent b41f7c67f1
commit c0e6987c3c
2 files changed
+4 -6

No files matched your search

@@ -10,7 +10,8 @@ const config = {
} satisfies ChartConfig;
export function CategoryChart({ data }: { data: CategorySaving[] }) {
const rows = [...data].sort((a, b) => b.savings - a.savings);
// 절감 차트 — 순절감이 음수(손해)인 카테고리는 표시하지 않는다.
const rows = data.filter((r) => r.savings > 0).sort((a, b) => b.savings - a.savings);
return (
<ChartContainer config={config} className="aspect-auto h-56 w-full">