From 9dbe7c0897fa656a0928fee267f5f5a63457c47c Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 7 Nov 2020 01:21:33 +0100 Subject: [PATCH] Changed endpoints and db queries, chart now shows suggested mins and maxes --- charts.html | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/charts.html b/charts.html index 4602ca1..64501b6 100644 --- a/charts.html +++ b/charts.html @@ -22,9 +22,7 @@ urlEndpoint += "since/" + pathname.slice(pathname.lastIndexOf("/") + 1); } const data = await fetch(urlEndpoint); - const newData = transformData(await data.json()); - console.log(pathname, newData); - return newData; + return transformData(await data.json()); } async function initChart() { @@ -75,8 +73,8 @@ id: 'y-axis-1', ticks: { fontColor: co2Color, - suggestedMin: 400, - suggestedMax: 1100, + min: 400, + max: 1100, }, }, { type: 'linear', @@ -85,8 +83,8 @@ id: 'y-axis-2', ticks: { fontColor: tempColor, - suggestedMin: 10, - suggestedMax: 35, + min: 10, + max: 35, }, gridLines: { drawOnChartArea: false, @@ -98,8 +96,8 @@ id: 'y-axis-3', ticks: { fontColor: humidityColor, - suggestedMin: 15, - suggestedMax: 85, + min: 15, + max: 85, }, gridLines: { drawOnChartArea: false,