- commit
- a33be0e
- parent
- c5214ca
- author
- Neale Pickett
- date
- 2023-03-11 16:18:31 -0700 MST
Bump chart resolution
1 files changed,
+4,
-4
+4,
-4
1@@ -144,8 +144,8 @@ class AreaChart extends Chart {
2 super(element, stat)
3 this.historyLen = historyLen
4 this.history = Array(this.historyLen) // Make it fill in from the right
5- this.canvas.width = 600
6- this.canvas.height = 500
7+ this.canvas.width = 1920
8+ this.canvas.height = 1080
9
10 // Cartesian coordinates
11 this.ctx.translate(0, this.canvas.height)
12@@ -180,7 +180,7 @@ class AreaChart extends Chart {
13 let val = h[j]
14 this.ctx.beginPath()
15 this.ctx.fillStyle = this.colors[j]
16- this.ctx.rect(x, y, xStep, yStep * val)
17+ this.ctx.rect(x, y, Math.ceil(xStep), Math.ceil(yStep * val))
18 this.ctx.fill()
19 y += yStep * val
20 }
21@@ -235,4 +235,4 @@ export {
22 PieChart,
23 AreaChart,
24 AutoStat,
25-}
26+}