From f320f6ff31ca777c0e2dfd7c1074edd76c33cbe7 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Mon, 6 Apr 2026 18:31:03 +0530 Subject: [PATCH] rolling and calender toggle --- src/components/HistoryChart.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/HistoryChart.tsx b/src/components/HistoryChart.tsx index 395592f..473d9cf 100644 --- a/src/components/HistoryChart.tsx +++ b/src/components/HistoryChart.tsx @@ -42,11 +42,11 @@ export default function HistoryChart({ // @ts-ignore rawData = data[activeDataKey]?.[period] || []; } - const currentData = [...rawData].reverse(); + const currentData = rawData; const maxAmount = currentData.length > 0 - ? Math.max(...currentData.map((d) => d.amount), 1) + ? Math.max(...currentData.map((d: { amount: any; }) => d.amount), 1) : 1; // ✅ Formatter (₹ + adaptive units) @@ -132,7 +132,7 @@ export default function HistoryChart({ {/* Chart Area */} {currentData.length > 0 ? ( - {currentData.map((point) => { + {currentData.map((point: { amount: number; id: string, highlighted: boolean }) => { const heightPerc = (point.amount / maxAmount) * 100; return (