Change Y-axis labels to start from 1 instead of 0
This commit is contained in:
@@ -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, ' ') + ' |';
|
||||||
|
|||||||
Reference in New Issue
Block a user