fix: fix the error when profits are zeros
This commit is contained in:
@@ -671,7 +671,7 @@ class LiveReportGenerator:
|
|||||||
length = len(profits)
|
length = len(profits)
|
||||||
indexs = list(range(0, length))
|
indexs = list(range(0, length))
|
||||||
|
|
||||||
abs_max = math.ceil(max(max(profits), abs(min(profits))))
|
abs_max = math.ceil(max(max(profits), abs(min(profits)), 0.01))
|
||||||
start = -abs_max - (-abs_max % 10)
|
start = -abs_max - (-abs_max % 10)
|
||||||
end = abs_max + (-abs_max % 10)
|
end = abs_max + (-abs_max % 10)
|
||||||
step = int((end - start) / 10)
|
step = int((end - start) / 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user