We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb47200 commit af01947Copy full SHA for af01947
1 file changed
apps/webapp/app/utils/graphs.ts
@@ -8,7 +8,7 @@ type Options<R> = {
8
export function createTimeSeriesData<R>({ startDate, endDate, window = "DAY", data }: Options<R>) {
9
const outputData: Array<{ date: Date; value?: R }> = [];
10
const periodLength = periodLengthMs(window);
11
- const periodCount = Math.floor((endDate.getTime() - startDate.getTime()) / periodLength);
+ const periodCount = Math.round((endDate.getTime() - startDate.getTime()) / periodLength);
12
13
for (let i = 0; i < periodCount; i++) {
14
const periodStart = new Date(startDate);
0 commit comments