From 5dbe0391ddac2bb3c47ebcd0beb09d45e681603b Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 26 Jan 2023 21:27:21 +0100 Subject: [PATCH] Extend linear time scale --- dashboard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dashboard.py b/dashboard.py index 5dd7f68..a90179b 100644 --- a/dashboard.py +++ b/dashboard.py @@ -307,7 +307,11 @@ class TimeSeries(Widget): if self.yscale == "linear": log.debug("") if unit == "s" and max_value > 3600: - if max_value >= 4 * 7 * 86400: + if max_value >= 16 * 7 * 86400: + step = 4 * 7 * 86400 + step_d = 4 + unit = "w" + elif max_value >= 4 * 7 * 86400: step = 7 * 86400 step_d = 1 unit = "w"