diff options
| author | Scott <[email protected]> | 2022-01-31 09:13:00 -0800 |
|---|---|---|
| committer | Scott <[email protected]> | 2022-01-31 09:13:00 -0800 |
| commit | 9313acd7f50f19dfa3a3ff32f686c924b4cfe75a (patch) | |
| tree | b064f3d19ca615c3c823df50a66fbe7397387dfc /text_utils.py | |
| parent | 1a092f01f1a945a330fe19e96a8de507823fc28e (diff) | |
If percent > 0, even if it's very small, render some little sliver of
a bar.
Diffstat (limited to 'text_utils.py')
| -rw-r--r-- | text_utils.py | 2 |
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) |
