🍶😺 Checkpoint

./public/index.js:1954897/70059
This commit is contained in:
Glitch (glitch-hello-node) committed 2021-11-14 16:04:13 +00:00
1 parent d74c1ad59a
commit 522635d3c4
2 files changed
+23 -1

No files matched your search

+3 -1
View File
@@ -141,6 +141,7 @@ async function displayCard(id) {
const delta = current - avg
const min = Math.min(...data.map(d => d.count))
const max = Math.max(...data.map(d => d.count))
const busy = delta < 0
const red = new Color(255, 0, 0)
const green = new Color(0, 255, 0)
@@ -179,8 +180,9 @@ function updateChart(data) {
acc[v.ago] = []
}
acc[v.ago].push(v.count)
console.log(acc)
return acc
}, []).map(v => v.reduce((acc, v) => acc + v, 0) / v.length)
}, Array.from({length: 6})).map(v => v.reduce((acc, v) => acc + v, 0) / v.length)
const ctx = document.getElementById('myChart').getContext('2d')
const labels = ['Now', '10m ago', '20m ago', '30m ago', '40m ago', '50m ago'].reverse()