feat: base 自适应容器和自动缩放2

This commit is contained in:
caoqianming 2025-09-29 11:18:55 +08:00
parent 9bf8b968fc
commit 7882e9ddb8
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ export default {
const scale = Math.min(svgWidth / graphWidth, svgHeight / graphHeight);
const translateX = (svgWidth - graphWidth * scale) / 2;
const translateY = (svgHeight - graphHeight * scale) / 2;
const translateY = (svgHeight - graphHeight * scale) / 4;
this.inner.attr("transform", `translate(${translateX},${translateY}) scale(${scale})`);
},