summaryrefslogtreecommitdiff
path: root/text_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'text_utils.py')
-rw-r--r--text_utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/text_utils.py b/text_utils.py
index cfed169..741e2a3 100644
--- a/text_utils.py
+++ b/text_utils.py
@@ -87,6 +87,8 @@ def bar_graph(
if whole_width == width:
whole_width -= 1
part_char = "▉"
+ elif whole_width == 0 and percentage > 0.0:
+ part_char = "▏"
else:
remainder_width = (percentage * width) % 1
part_width = math.floor(remainder_width * 8)