antvis/G6

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

  1. try to remove node label with graph.updateItem(node, { label: undefined })
  2. 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


Fund this Issue

$0.00
Funded

Pull requests