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 +}