From a33be0e8fdf35f7081c0a35995b7e3b244aee514 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sat, 11 Mar 2023 16:18:31 -0700 Subject: [PATCH] Bump chart resolution --- web/stat.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/stat.mjs b/web/stat.mjs index 952f28c..bb4001a 100644 --- a/web/stat.mjs +++ b/web/stat.mjs @@ -144,8 +144,8 @@ class AreaChart extends Chart { super(element, stat) this.historyLen = historyLen this.history = Array(this.historyLen) // Make it fill in from the right - this.canvas.width = 600 - this.canvas.height = 500 + this.canvas.width = 1920 + this.canvas.height = 1080 // Cartesian coordinates this.ctx.translate(0, this.canvas.height) @@ -180,7 +180,7 @@ class AreaChart extends Chart { let val = h[j] this.ctx.beginPath() this.ctx.fillStyle = this.colors[j] - this.ctx.rect(x, y, xStep, yStep * val) + this.ctx.rect(x, y, Math.ceil(xStep), Math.ceil(yStep * val)) this.ctx.fill() y += yStep * val } @@ -235,4 +235,4 @@ export { PieChart, AreaChart, AutoStat, -} \ No newline at end of file +}