From 50772eeece87fc0574a0c76ad265a98f53f38b3d Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 6 May 2024 16:50:27 +0300 Subject: [PATCH] Fix '366 of 365 days studied' (#3182) * Fix '366 of 365 days studied' * Apply nicing when GraphRange.AllTime is selected --- ts/routes/graphs/reviews.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/routes/graphs/reviews.ts b/ts/routes/graphs/reviews.ts index a2ba76afb..c5edfc9ff 100644 --- a/ts/routes/graphs/reviews.ts +++ b/ts/routes/graphs/reviews.ts @@ -110,8 +110,10 @@ export function renderReviews( } const desiredBars = Math.min(70, Math.abs(xMin!)); - const x = scaleLinear().domain([xMin!, xMax]).nice(desiredBars); - x.domain([x.domain()[0], xMax]); + const x = scaleLinear().domain([xMin!, xMax]); + if (range === GraphRange.AllTime) { + x.nice(desiredBars); + } const sourceMap = showTime ? sourceData.reviewTime : sourceData.reviewCount; const bins = bin()