From 6c305e0cdd0eacdca1338e22df410e2b80eb9506 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Tue, 7 Apr 2026 11:12:29 +0530 Subject: [PATCH] labels with proper formatting --- src/components/HistoryChart.tsx | 37 ++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/src/components/HistoryChart.tsx b/src/components/HistoryChart.tsx index 99553bb..f61b102 100644 --- a/src/components/HistoryChart.tsx +++ b/src/components/HistoryChart.tsx @@ -5,6 +5,7 @@ export interface ChartDataPoint { id: string; amount: number; compareAmount?: number; + compareLabel?: compareLabel; highlighted?: boolean; } @@ -232,18 +233,40 @@ export default function HistoryChart({ - - {formatLabel(point.id, activeDataKey)} - + + {formatLabel(point.id, activeDataKey)} + + + {comparison && point.compareLabel && activeDataKey !== "daily" && ( + + {formatLabel(point.compareLabel, activeDataKey)} + + )} + ); })}