Change Y-axis labels to start from 1 instead of 0

This commit is contained in:
Your Name
2025-10-21 12:00:55 -04:00
parent fcf94ed2cb
commit bf1785f372

View File

@@ -236,8 +236,8 @@ class ASCIIBarChart {
} }
} }
// Calculate the actual count value this row represents (0 at bottom, increasing upward) // Calculate the actual count value this row represents (1 at bottom, increasing upward)
const rowCount = (row - 1) * scaleFactor; const rowCount = (row - 1) * scaleFactor + 1;
// Add Y-axis label (show actual count values) // Add Y-axis label (show actual count values)
line += String(rowCount).padStart(3, ' ') + ' |'; line += String(rowCount).padStart(3, ' ') + ' |';