5.x: Set node size based on label automatically #7340
-
before 5.x I could use the solution posted in #2331 to have nodes fit around a label's size now this doesn't work anymore and https://g6.antv.antgroup.com/en/manual/whats-new/upgrade#preparation-before-upgrade mentions how can I do it now? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
this likely works, found in the FAQ of the documentation #6347 (comment) |
Beta Was this translation helpful? Give feedback.
-
actually, that snippet by itself doesn't work. after removing the typescript syntax and (temporarily) removing nonexistent functions like the memoize function, the problem is that the |
Beta Was this translation helpful? Give feedback.
-
without memoization (not recommended), this is one way to do it using node.style.labelText
|
Beta Was this translation helpful? Give feedback.
without memoization (not recommended), this is one way to do it
using node.style.labelText