Bump chart resolution
This commit is contained in:
parent
c5214ca416
commit
a33be0e8fd
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue