Repository navigation
Is it possible to have a label inside a node as well as a label below it? #1952
Unanswered
IsaacWaiteGov
asked this question in
Q&A
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. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Just looking for a way to put a identifier inside a node with a description below the node.

Something like this:
All reactions