heatmaps: part 8

This commit is contained in:
nym21
2026-05-31 18:57:23 +02:00
parent 5df399d2f7
commit 7860c5a8bd
6 changed files with 32 additions and 21 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ export function createAverageGrid({
if (col < 0 || col >= cols || dates.length === 0) {
return emptyRange();
}
const start = Math.floor((col * dates.length) / cols);
const start = Math.ceil((col * dates.length) / cols);
const end = Math.floor(((col + 1) * dates.length - 1) / cols);
return { start, end: clamp(end, start, dates.length - 1) };
},