From 89532428d57e044146fc370bcf1763deb74f667f Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Wed, 6 Nov 2024 13:06:16 -0500 Subject: [PATCH] fix: make top_count nonzero --- starbot/painter/RankingGenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starbot/painter/RankingGenerator.py b/starbot/painter/RankingGenerator.py index d768a13..78468dc 100644 --- a/starbot/painter/RankingGenerator.py +++ b/starbot/painter/RankingGenerator.py @@ -153,7 +153,7 @@ class RankingGenerator: reverse_bar_x = face_x + offset top_bar_width = (width - face_size) / 2 + offset if top_count is None: - top_count = max(max(counts), abs(min(counts))) + top_count = max(max(counts), abs(min(counts)), 0.001) chart = PicGenerator(width, (face_size * count) + (row_space * (count - 1))) chart.set_row_space(row_space)