Skip to content

Commit

Permalink
use user provided end date for x-axis calc (#584) (#604)
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
(cherry picked from commit c280bad)

Co-authored-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
  • Loading branch information
opensearch-trigger-bot[bot] and amsiglan committed May 30, 2023
1 parent b840da7 commit e223471
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 e223471

Please sign in to comment.