From bf1785f3727de1202f9a591fb03fdb1c2ca13dcd Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 21 Oct 2025 12:00:55 -0400 Subject: [PATCH] Change Y-axis labels to start from 1 instead of 0 --- text_graph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text_graph.js b/text_graph.js index 00ebaf6..059d7f4 100644 --- a/text_graph.js +++ b/text_graph.js @@ -236,8 +236,8 @@ class ASCIIBarChart { } } - // Calculate the actual count value this row represents (0 at bottom, increasing upward) - const rowCount = (row - 1) * scaleFactor; + // Calculate the actual count value this row represents (1 at bottom, increasing upward) + const rowCount = (row - 1) * scaleFactor + 1; // Add Y-axis label (show actual count values) line += String(rowCount).padStart(3, ' ') + ' |';