diff --git a/ui/chart/src/chart.ratingHistory.ts b/ui/chart/src/chart.ratingHistory.ts index fb9bbb25848c3..e5fb228920c5a 100644 --- a/ui/chart/src/chart.ratingHistory.ts +++ b/ui/chart/src/chart.ratingHistory.ts @@ -324,6 +324,10 @@ function smoothDates(data: TsAndRating[], step: number, begin: number) { const reversed = data.slice().reverse(); const allDates: number[] = []; for (let i = begin; i <= end; i += oneStep) allDates.push(i); + // Ensure latest rating is always included (regardless of step or begin) + if (allDates[allDates.length - 1] < end) { + allDates.push(end); + } const result: Point[] = []; for (let j = 0; j < allDates.length; j++) { const match = reversed.find(x => x.ts <= allDates[j]);