Skip to content

Commit

Permalink
use user provided end date for x-axis calc (#584)
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
(cherry picked from commit c280bad)
  • Loading branch information
amsiglan authored and github-actions[bot] committed May 30, 2023
1 parent 1975525 commit a90d21c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/pages/Overview/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ export const getDomainRange = (
if (timeUnit) {
const timeUnitSize = timeUnit.match(/.*(seconds|minutes|hours|date|month|year)$/);
if (timeUnitSize && timeUnitSize[1]) {
rangeEnd = `now+1${timeUnitSize[1][0]}`;
// `||` is the separator which the datemath's parse method will use to split the dates for
// the addition.
rangeEnd = `${range[1]}||+1${timeUnitSize[1][0]}`;
}
}
const end: number = parseDateString(rangeEnd);
Expand Down

0 comments on commit a90d21c

Please sign in to comment.