From d3a439bb492bc502ebaa2a80a0d76ab59dc981ef Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 4 Feb 2023 12:16:37 +0100 Subject: [PATCH] Stop if we run out of tickmark frequencies --- dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard.py b/dashboard.py index a90179b..b650c7e 100644 --- a/dashboard.py +++ b/dashboard.py @@ -171,7 +171,7 @@ class TimeSeries(Widget): min_step = 25 steps = ("s", "m", "h", "D", "10D", "M", "Y") step_i = 0 - while True: + while step_i < len(steps): t0 = tickmarks[-1]["t"] x0 = tickmarks[-1]["x"] d0 = datetime.datetime.fromtimestamp(t0)