From e4c6e082f09457f6b14e1a1149f21353b2146cc3 Mon Sep 17 00:00:00 2001 From: junlu592 Date: Thu, 20 Nov 2025 13:20:40 +0100 Subject: [PATCH] fix statistics calendar and review grapgh range labeling --- ts/routes/graphs/reviews.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ts/routes/graphs/reviews.ts b/ts/routes/graphs/reviews.ts index ed0e07f8c..8302cb4c9 100644 --- a/ts/routes/graphs/reviews.ts +++ b/ts/routes/graphs/reviews.ts @@ -111,9 +111,6 @@ export function renderReviews( const desiredBars = Math.min(70, Math.abs(xMin!)); const x = scaleLinear().domain([xMin!, xMax]); - if (range === GraphRange.AllTime) { - x.nice(desiredBars); - } const sourceMap = showTime ? sourceData.reviewTime : sourceData.reviewCount; const bins = bin() @@ -212,7 +209,9 @@ export function renderReviews( } function tooltipText(d: BinType, cumulative: number): string { - const day = dayLabel(d.x0!, d.x1!); + const startDay = Math.trunc(d.x0!); + const endDay = Math.trunc(d.x1!); + const day = dayLabel(startDay, endDay); const totals = totalsForBin(d); const dayTotal = valueLabel(sum(totals)); let buf = ``;
${day}${dayTotal}