Is it possible to have a label inside a node as well as a label below it? #1952
Replies: 1 comment
-
You can create your own custom node renderer using HTML canvas primitives. For your example, you would output a filled circle, and 2 difference pieces of text, presumably the label and another custom node property. I believe the vis examples show how to do this. Briefly, here you could do the following JavaScript pseudo-code: function drawNodeTwoLabels( { ctx, id, x, y, state: { selected, hover }, style } ) { node1.ctxRenderer= drawNodeTwoLabels; In the function you set up the stroke style and width, and fill style and draw the arc. You then draw the 2 labels positioned relative to the x,y you are passed, and the size of node you drew. |
Beta Was this translation helpful? Give feedback.
-
Just looking for a way to put a identifier inside a node with a description below the node.
Something like this:
Beta Was this translation helpful? Give feedback.
All reactions