diff --git a/src/components/HistoryChart.tsx b/src/components/HistoryChart.tsx index 4bb4061..47b2800 100644 --- a/src/components/HistoryChart.tsx +++ b/src/components/HistoryChart.tsx @@ -162,7 +162,10 @@ export default function HistoryChart({ {currentData.map((point) => { const currentHeight = (point.amount / maxAmount) * 100; - const compareHeight = ((point.compareAmount || 0) / maxAmount) * 100; + const compareHeight = comparison + ? ((point.compareAmount || 0) / maxAmount) * 100 + : 0; + const labelHeight = Math.max(currentHeight, compareHeight); return ( + + {formatDisplay(point, activeTab.toLowerCase(), comparison)} + + + {/* Compare */} {comparison && ( )} + {/* Spacer */} + + + {/* Current */} - - {formatDisplay(point, activeTab.toLowerCase(), comparison)} - - + />