antvis/G2





The issue has been closed
[Bug]: 配置autofit后,在进行图例filter交互后触发resize会导致显示不正确 #6714
interstellarmt posted onGitHub
Describe the bug / 问题描述
https://github.com/ant-design/ant-design-charts/issues/2873
配置autoFit: true
后,如果图表中存在分类图例,点击进行filter交互后,此时改变容器大小触发resize,显示不符合预期:
经排查后不是饼图的特殊问题,具有普遍性,类似的还有折线图:
resize前:
resize后:
面积图:
Reproduction link / 复现链接
https://stackblitz.com/edit/react-chvm779o-p8z7rqsw?file=src%2Findex.js
Steps to Reproduce the Bug or Issue / 重现步骤
- 图表存在分类图例。
- 配置图表属性autoFit为true。
- 点击图例进行filter交互。
- 改变图表容器大小(缩放,拖动等)
- 图表显示不正确。
Version / 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他