Bump chart resolution
This commit is contained in:
parent
c5214ca416
commit
a33be0e8fd
|
@ -144,8 +144,8 @@ class AreaChart extends Chart {
|
||||||
super(element, stat)
|
super(element, stat)
|
||||||
this.historyLen = historyLen
|
this.historyLen = historyLen
|
||||||
this.history = Array(this.historyLen) // Make it fill in from the right
|
this.history = Array(this.historyLen) // Make it fill in from the right
|
||||||
this.canvas.width = 600
|
this.canvas.width = 1920
|
||||||
this.canvas.height = 500
|
this.canvas.height = 1080
|
||||||
|
|
||||||
// Cartesian coordinates
|
// Cartesian coordinates
|
||||||
this.ctx.translate(0, this.canvas.height)
|
this.ctx.translate(0, this.canvas.height)
|
||||||
|
@ -180,7 +180,7 @@ class AreaChart extends Chart {
|
||||||
let val = h[j]
|
let val = h[j]
|
||||||
this.ctx.beginPath()
|
this.ctx.beginPath()
|
||||||
this.ctx.fillStyle = this.colors[j]
|
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()
|
this.ctx.fill()
|
||||||
y += yStep * val
|
y += yStep * val
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue