vasturiano/force-graph

Formatting Node labels (not the hovering label) Force-graph 2D; ReactJS

Opened this issue · 2 comments

@vasturiano

Currently, node labels are displaying like this, with nodeCanvasObject
the text is spilling out of circular node:

image

How can I set node labels like this when the text is longer (or a full sentence), so that it can wrap inside the circular node...
image

Thanks

@nalindeepan007 the implementation of how the node looks like, including the layout of your text is inside your implementation of nodeCanvasObject, so you can design it whichever way you'd like, using canvas instructions.

is there any explicit function/argument in nodeCanvasObject for wrapping the text in node circle in this way?

thanks @vasturiano