[Bug]: 图表布局中padding自动计算的尺寸溢出了
Author: xiaoke-1Created May 6, 2026Updated May 6, 2026
Labelswaiting for maintainer
Describe the bug / 问题描述
视图模型中将图表划分为四个区域,margin应该是图表四周留白的间距,padding是坐标轴图例等组件的空间,默认是自动计算的尺寸, 如果想把图表四周的间距去掉,让图表顶边绘制,会发现Y轴实际上溢出了, 在V4版本默认是四周没有间距的,我们项目想从V4升级到V5,发现默认尺寸对不上,但是调整margin又会导致溢出
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
官方示例中增加margin:0可复现
Version / 版本
5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他
Source: antvis/G2