From a7df9e58de6cb9f8c5dac718fe4423dc643c1a68 Mon Sep 17 00:00:00 2001 From: LWR Date: Mon, 11 Nov 2024 23:02:53 +0800 Subject: [PATCH] fix: Fixed possible slice step is 0 when generate box profit diagram --- starbot/painter/LiveReportGenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starbot/painter/LiveReportGenerator.py b/starbot/painter/LiveReportGenerator.py index 67bde61..a84d5bf 100644 --- a/starbot/painter/LiveReportGenerator.py +++ b/starbot/painter/LiveReportGenerator.py @@ -674,7 +674,7 @@ class LiveReportGenerator: end = abs_max + (-abs_max % 10) step = int((end - start) / 10) - yticks = list(range(start, end)[::step]) + yticks = list(range(start, end)[::step]) if step != 0 else [0] yticks.append(end) return cls.__get_line_diagram( indexs, profits, [], yticks, [], [], (-1, length), (start, end), width