fix: HiChart不设style.width 让CSS 100%管显示宽度

This commit is contained in:
qinglong
2026-06-14 15:15:51 +08:00
parent 2bf6a0e219
commit 83aa8aa93e
+1 -2
View File
@@ -162,8 +162,7 @@
var h = 60; var h = 60;
this.canvas.width = w * this._dpr; this.canvas.width = w * this._dpr;
this.canvas.height = h * this._dpr; this.canvas.height = h * this._dpr;
this.canvas.style.width = w + 'px'; // CSS controls display size via width:100%;height:60px
this.canvas.style.height = h + 'px';
this.ctx.setTransform(this._dpr, 0, 0, this._dpr, 0, 0); this.ctx.setTransform(this._dpr, 0, 0, this._dpr, 0, 0);
this._draw(); this._draw();
}; };