Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Fix graph calculation (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruggerocastagnola authored Sep 12, 2023
2 parents 67cd03d + fb5ab28 commit 4c5ef2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/charts/lineChart/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ export const LineChart: React.FC<IProps> = ({ 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
Expand Down

0 comments on commit 4c5ef2e

Please sign in to comment.