From fb5ab28b3b613960e485c3d15888c65db7b480d7 Mon Sep 17 00:00:00 2001 From: acolucci Date: Mon, 11 Sep 2023 17:55:25 +0200 Subject: [PATCH] Fix graph calculation --- src/components/charts/lineChart/LineChart.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/charts/lineChart/LineChart.tsx b/src/components/charts/lineChart/LineChart.tsx index f7fc45b..bad5b84 100644 --- a/src/components/charts/lineChart/LineChart.tsx +++ b/src/components/charts/lineChart/LineChart.tsx @@ -57,10 +57,10 @@ export const LineChart: React.FC = ({ data, failures, startDate, endDate //min date that appears on the graphs //which is selected based on the filters selected : startDate -> endDate - 3 months -> yesterday const minTime = startDate - ? new Date(startDate) + ? new Date(startDate).setMinutes(0) : endDate - ? subMonths(new Date(endDate), 3) - : new Date(new Date().getTime() - 1 * 24 * 60 * 60 * 1000) + ? subMonths(new Date(endDate).setMinutes(0), 3) + : new Date(new Date().getTime() - 1 * 24 * 60 * 60 * 1000).setMinutes(0) //max date that appears on the graphs //which is chosen based on the filters selected