From 969887cc67a6a19c85a189517744fdd440dac7a9 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Fri, 13 Mar 2026 13:08:28 +0100 Subject: [PATCH] style: use CartesianGrid for horizontal lines aligned with Y-axis ticks Replace the CSS overlay with Recharts CartesianGrid (horizontal only) so lines align perfectly with the Y-axis values. --- components/dashboard/Chart.tsx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/components/dashboard/Chart.tsx b/components/dashboard/Chart.tsx index 5305cc0..50062ab 100644 --- a/components/dashboard/Chart.tsx +++ b/components/dashboard/Chart.tsx @@ -2,7 +2,7 @@ import { useState, useMemo, useRef, useCallback, useEffect } from 'react' import { useTheme } from '@ciphera-net/ui' -import { Line, LineChart, XAxis, YAxis, ReferenceLine } from 'recharts' +import { CartesianGrid, Line, LineChart, XAxis, YAxis, ReferenceLine } from 'recharts' import { ChartContainer, ChartTooltip, type ChartConfig } from '@/components/ui/line-charts-6' import { Card, CardContent, CardHeader } from '@/components/ui/card' import { formatNumber, formatDuration, formatUpdatedAgo, DatePicker } from '@ciphera-net/ui' @@ -384,17 +384,7 @@ export default function Chart({ - - {/* Subtle horizontal lines background */} -
+ {/* Toolbar */}
@@ -485,6 +475,13 @@ export default function Chart({ + +