added visualisation

This commit is contained in:
Daniel Ledda
2020-11-05 00:01:22 +01:00
parent ad91ec1c22
commit a603743284

View File

@@ -17,7 +17,8 @@
async function initChart() {
const ctx = document.getElementById('myChart').getContext('2d');
const data = await fetch("/data/");
const data = await fetch("data/");
console.log(data);
const {humidity, temp, co2} = transformData(await data.json());
const myChart = Chart.Line(ctx, {
data: {