added visualisation
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
async function initChart() {
|
async function initChart() {
|
||||||
const ctx = document.getElementById('myChart').getContext('2d');
|
const ctx = document.getElementById('myChart').getContext('2d');
|
||||||
const data = await fetch("http://tortedda.local/climate/data/");
|
const data = await fetch("/data/");
|
||||||
const {humidity, temp, co2} = transformData(await data.json());
|
const {humidity, temp, co2} = transformData(await data.json());
|
||||||
const myChart = Chart.Line(ctx, {
|
const myChart = Chart.Line(ctx, {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
Reference in New Issue
Block a user