From 6691df73f5090ece212ee36188c5ff93a49d6c29 Mon Sep 17 00:00:00 2001 From: Anton Roslund Date: Thu, 26 Jun 2025 22:33:37 +0200 Subject: [PATCH] Add IAQ metrics --- src/public/index.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/public/index.html b/src/public/index.html index 4180ced..19f5750 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -758,6 +758,10 @@
Pressure
+
+
+
IAQ
+
@@ -2057,11 +2061,13 @@ const temperatureMetrics = []; const relativeHumidityMetrics = []; const barometricPressureMetrics = []; + const iaqMetrics = []; for(const deviceMetric of this.selectedNodeEnvironmentMetrics){ labels.push(moment(deviceMetric.created_at)); temperatureMetrics.push(deviceMetric.temperature); relativeHumidityMetrics.push(deviceMetric.relative_humidity); barometricPressureMetrics.push(deviceMetric.barometric_pressure); + iaqMetrics.push(deviceMetric.iaq); } // create chart @@ -2101,6 +2107,17 @@ yAxisID: 'y1', }, + { + label: 'IAQ', + suffix: 'IAQ', + borderColor: '#f472b6', + backgroundColor: '#f472b6', + pointStyle: false, // no points + fill: false, + data: iaqMetrics, + yAxisID: 'yIAQ', + + }, ], }, options: { @@ -2139,6 +2156,10 @@ drawOnChartArea: false, // only want the grid lines for one axis to show up }, }, + yIAQ: { + type: 'linear', + display: false, + }, }, plugins: { legend: {