better legends

This commit is contained in:
2026-08-12 08:31:38 +02:00
parent 84788deadd
commit 25966a1213
+4 -2
View File
@@ -40,10 +40,12 @@ def graph(output: Path, rrd: Path, start: str, title: str, unit: str,
args += ["--lower-limit", "0", "--upper-limit", "100", "--rigid"]
if thermal_mixed:
args += ["--lower-limit", "0", "--upper-limit", "100", "--rigid"]
if any(ds.startswith("health_") for ds, _label, _cf in series):
health_graph = any(ds.startswith("health_") for ds, _label, _cf in series)
if health_graph:
args += ["--lower-limit", "0", "--upper-limit", "10", "--rigid",
"HRULE:5#9CA3AF:action threshold",
"HRULE:3#DC2626:urgent threshold"]
"HRULE:3#DC2626:urgent threshold",
"COMMENT:\\n"]
value_suffix = "%%" if unit == "%" else ""
for index, (ds, label, cf) in enumerate(series):
var = f"v{index}"