💳☂️ Checkpoint

./public/index.js:1954897/20056
This commit is contained in:
Glitch (glitch-hello-node) committed 2021-11-14 15:40:45 +00:00
1 parent ec7755bfa5
commit 99fe2357f5
1 file changed
+1 -2
+1 -2
View File
@@ -76,7 +76,7 @@ async function drawRegions() {
console.log(ecsw)
const avg = ecsw.reduce((acc, v) => acc + v.count, 0) / ecsw.length
const current = ecsw[ecsw.length - 1].count
const current = ecsw[ecsw.length - 1]?.count ?? NaN
const delta = current - avg
const busy = delta > 0
const color = busy ? '#ff0000' : '#00ff00'
@@ -153,7 +153,6 @@ function updateChart(data) {
const ctx = document.getElementById('myChart').getContext('2d')
const labels = ['Now', '10m ago', '20m ago', '30m ago', '40m ago', '50m ago'].reverse()
console.log(parsed.slice(0, labels.length))
new Chart(ctx, {
type: 'line',