fix: Fixed an error that occurred when the box profit changes were small in live report generation

This commit is contained in:
LWR 2023-05-07 23:48:15 +08:00
parent 22abe91380
commit 8272c0baf1

View File

@ -663,7 +663,7 @@ class LiveReportGenerator:
length = len(profits)
indexs = list(range(0, length))
abs_max = int(max(max(profits), abs(min(profits))))
abs_max = math.ceil(max(max(profits), abs(min(profits))))
start = -abs_max - (-abs_max % 10)
end = abs_max + (-abs_max % 10)
step = int((end - start) / 10)