Bump chart resolution

This commit is contained in:
Neale Pickett 2023-03-11 16:18:31 -07:00
parent c5214ca416
commit a33be0e8fd
1 changed files with 4 additions and 4 deletions

View File

@ -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,
}
}