Skip to content

Commit

Permalink
null filling for UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Ryashin committed Sep 6, 2023
1 parent 9899133 commit e74538a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { useTimeControlStore } from "@rilldata/web-common/features/dashboards/time-controls/time-control-store";
import { EntityStatus } from "@rilldata/web-common/features/entity-management/types";
import { TIME_GRAIN } from "@rilldata/web-common/lib/time/config";
import {
getAdjustedChartTime,
getAdjustedFetchTime,
Expand Down
54 changes: 27 additions & 27 deletions web-common/src/features/dashboards/time-series/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,41 +106,41 @@ export function prepareTimeSeries(

switch (dtu) {
case "year":
dtStart = dtStart.plus({ years: 1 });
dtCompStart = dtCompStart.plus({ years: 1 });
break;
dtStart = dtStart.plus({ years: 1 });
dtCompStart = dtCompStart.plus({ years: 1 });
break;
case "quarter":
dtStart = dtStart.plus({ quarters: 1 });
dtCompStart = dtCompStart.plus({ quarters: 1 });
break;
dtStart = dtStart.plus({ quarters: 1 });
dtCompStart = dtCompStart.plus({ quarters: 1 });
break;
case "month":
dtStart = dtStart.plus({ months: 1 });
dtCompStart = dtCompStart.plus({ months: 1 });
break;
dtStart = dtStart.plus({ months: 1 });
dtCompStart = dtCompStart.plus({ months: 1 });
break;
case "week":
dtStart = dtStart.plus({ weeks: 1 });
dtCompStart = dtCompStart.plus({ weeks: 1 });
break;
dtStart = dtStart.plus({ weeks: 1 });
dtCompStart = dtCompStart.plus({ weeks: 1 });
break;
case "day":
dtStart = dtStart.plus({ days: 1 });
dtCompStart = dtCompStart.plus({ days: 1 });
break;
dtStart = dtStart.plus({ days: 1 });
dtCompStart = dtCompStart.plus({ days: 1 });
break;
case "hour":
dtStart = dtStart.plus({ hours: 1 });
dtCompStart = dtCompStart.plus({ hours: 1 });
break;
dtStart = dtStart.plus({ hours: 1 });
dtCompStart = dtCompStart.plus({ hours: 1 });
break;
case "minute":
dtStart = dtStart.plus({ minutes: 1 });
dtCompStart = dtCompStart.plus({ minutes: 1 });
break;
dtStart = dtStart.plus({ minutes: 1 });
dtCompStart = dtCompStart.plus({ minutes: 1 });
break;
case "second":
dtStart = dtStart.plus({ seconds: 1 });
dtCompStart = dtCompStart.plus({ seconds: 1 });
break;
dtStart = dtStart.plus({ seconds: 1 });
dtCompStart = dtCompStart.plus({ seconds: 1 });
break;
case "millisecond":
dtStart = dtStart.plus({ milliseconds: 1 });
dtCompStart = dtCompStart.plus({ milliseconds: 1 });
break;
dtStart = dtStart.plus({ milliseconds: 1 });
dtCompStart = dtCompStart.plus({ milliseconds: 1 });
break;
}
j++;
}
Expand Down

0 comments on commit e74538a

Please sign in to comment.