Skip to content

Commit af01947

Browse files
authored
Get data for the last day of the month for usage graphs (#1999)
1 parent cb47200 commit af01947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/webapp/app/utils/graphs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Options<R> = {
88
export function createTimeSeriesData<R>({ startDate, endDate, window = "DAY", data }: Options<R>) {
99
const outputData: Array<{ date: Date; value?: R }> = [];
1010
const periodLength = periodLengthMs(window);
11-
const periodCount = Math.floor((endDate.getTime() - startDate.getTime()) / periodLength);
11+
const periodCount = Math.round((endDate.getTime() - startDate.getTime()) / periodLength);
1212

1313
for (let i = 0; i < periodCount; i++) {
1414
const periodStart = new Date(startDate);

0 commit comments

Comments
 (0)