G6
G6 copied to clipboard
edge disappears on selection, using SVG renderer
Describe the bug
When using the SVG renderer, selecting an edge causes it to disappear.
Your Example Website or App
https://stackblitz.com/edit/react-btcnz7-eevgj8?file=index.js,index.html
Steps to Reproduce the Bug or Issue
- open the stackblitz link
- click the "select edge" button
- the edge disappears
Expected behavior
The behaviour should be the same as with the canvas renderer; the edge should remain visible and be displayed with the default selection styles.
Screenshots or Videos

Platform
- OS: macOS
- Browser: tested on chrome and firefox - the issue is present on both
- Version: chrome 104.0.5112.101, @antv/g6 4.7.0
Additional context
No response
Yes, there are some problems still remain in SVG renderer. But I'm afraid they could not be solved recently. we suggest to use canvas renderer instead.
@Yanyan-Wang should we upgrade the version of g-svg that G6 is using? Is there any reason why we shouldn't do that?
Yes, there are some problems still remain in SVG renderer. But I'm afraid they could not be solved recently. we suggest to use canvas renderer instead.
Nowadays, svg rendering looks a lot more inconsistent than canvas, and it's harder to debug. Are there any optimisations planned for this area?
@songhn233 apparently the plan is to upgrade the renderer some time soon https://github.com/antvis/G6/issues/2859#issuecomment-1364958051 🤞
@songhn233 apparently the plan is to upgrade the renderer some time soon #2859 (comment) 🤞
@ensconced Thanks for the reply, but it will be a while before the 5.0 plan is actually implemented, and the debugging costs for compatibility with 4.x and migration are likely to be greater.
I will prioritise other ways to support the need for custom HTML/React nodes.
In the latest G6 5.0, this issue has been fixed. (By ClickElement behavior)