antvis/G6
The issue has been closed
can't remove node label #4430
ensconced posted onGitHub
Describe the bug
Node label can't be removed by setting label: undefined
. Setting to an empty string does work but this is not a good workaround because if there is a label background, then this is still visible for an empty string.
Your Example Website or App
https://stackblitz.com/edit/react-spflig-szup5p?file=index.js
Steps to Reproduce the Bug or Issue
- try to remove node label with
graph.updateItem(node, { label: undefined })
- the node label is not removed
Expected behavior
I expect to be able to remove the label by setting it to undefined, or null.
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: chrome
- Version: 112
Additional context
No response