diff --git a/ts/routes/graphs/reviews.ts b/ts/routes/graphs/reviews.ts index f40b532e4..df1c03759 100644 --- a/ts/routes/graphs/reviews.ts +++ b/ts/routes/graphs/reviews.ts @@ -134,12 +134,11 @@ export function renderReviews( const sourceMap = showTime ? sourceData.reviewTime : sourceData.reviewCount; // Create bins using the thresholds: each bin contains data points between consecutive thresholds - let bins = bin() + const bins = bin() .value((m) => m[0]) // Extract the day number from each map entry [day, data] .domain(x.domain() as any) // Bins are constrained to this domain [xMin, xMax] .thresholds(thresholds)(sourceMap.entries() as any); // Use computed thresholds to split data into bins - // empty graph? const totalDays = sum(bins, (bin) => bin.length); if (!totalDays) {