diff --git a/apps/webapp/app/utils/graphs.ts b/apps/webapp/app/utils/graphs.ts index 6220714547c..6f0e39730e6 100644 --- a/apps/webapp/app/utils/graphs.ts +++ b/apps/webapp/app/utils/graphs.ts @@ -8,7 +8,7 @@ type Options = { export function createTimeSeriesData({ startDate, endDate, window = "DAY", data }: Options) { const outputData: Array<{ date: Date; value?: R }> = []; const periodLength = periodLengthMs(window); - const periodCount = Math.floor((endDate.getTime() - startDate.getTime()) / periodLength); + const periodCount = Math.round((endDate.getTime() - startDate.getTime()) / periodLength); for (let i = 0; i < periodCount; i++) { const periodStart = new Date(startDate);