From 9313acd7f50f19dfa3a3ff32f686c924b4cfe75a Mon Sep 17 00:00:00 2001 From: Scott Date: Mon, 31 Jan 2022 09:13:00 -0800 Subject: [PATCH] If percent > 0, even if it's very small, render some little sliver of a bar. --- text_utils.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.46.0