G6
G6 copied to clipboard
[Bug]: The image has not been exported full under the 'overall' option., but I was not use any other custom renderer
Describe the bug / 问题描述
I exported an image using toDataURL, but the image was not fully rendered. After checking my code, I found that I did not use any custom renderer. It seems that the graph cannot correctly calculate the size of nodes at the edge of the canvas. Additionally, we might need a padding option.
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
Version / 版本
🆕 5.x
OS / 操作系统
- [x] macOS
- [x] Windows
- [x] Linux
- [ ] Others / 其他
Browser / 浏览器
- [x] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他
To fix the truncated export issue, set graph options with padding: 20 and autoFit: 'view':
To fix the truncated export issue, set graph options with
padding: 20andautoFit: 'view':
I had set the two options, but it doesn’t seem to be working.
@Aarebecca 帮忙看下呢