vis-network
vis-network copied to clipboard
Support for multiple labels on one edge
Edges can only have 1 label. I want to request multiple labels on an edge. This will be useful for single bidirectional edge.
Can't you just label your edges like
← label 1 | label 2 →
or
← label 1
label 2 →
If this is not acceptable solution way more information will be needed to discus this. Like how should the labels be placed, should there be from, middle and to labels or do you imagine something different, do you want the labels near the middle, near the arrows etc.
I was looking at this issue from the old repo. It would be nice if the labels were near the node. You can see examples on that issue.
https://github.com/almende/vis/issues/2104
There was an attempt to add this feature on this fork.
https://github.com/pdugas/vis/blob/develop/examples/network/edgeStyles/labels.html
"fromLabel" and "toLabel" would make it intuitive.
I also vote for this improvement, on the network diagrams, the signatures under the interfaces should be
Can't you just label your edges like
← label 1 | label 2 →
or
← label 1 label 2 →
If this is not acceptable solution way more information will be needed to discus this. Like how should the labels be placed, should there be from, middle and to labels or do you imagine something different, do you want the labels near the middle, near the arrows etc.
When you change the position of the equipment, for example, changing the location of the left-right places, the label recorded in one line becomes not informative, the meaning is distorted
Therefore, this improvement for network circuits is very necessary
I also vote for this improvement. We need at list three labels. "From", "Center", "To"
I’m also interested in this. @pdugas can you put your original code here as a PR so we have something to start from?
@RicoSuter, I'm not using this package any more. I switched to Cytoscape.js a while ago for node grouping and end-labels on edges. Y'all are obviously welcome to cherry pick what you want. IIRC, my mods were on the develop
branch.
I vote for this improvement, too. It is really very necessary to have three different labels ("label", "label_from", "label_to") for network interfaces marking. I even thought to use "image arrow heads" for this (using custom images of numbers instead of arrows), but in this case I would like (and can not) to disable rotating it according to line direction, therefore "6" can become "9" after object moving (and, generally, this does not look like elegant solution). Another good solution for me would be additional arrowhead/arrowtail type "label" (for example) with text attributes like "labelhead"/"labeltail". These labels could be like circles with short text inside or outside it. But I thing the above (initial) improvement is less difficult to implement.
Is this requirement Implemented? Please share the if someone has any solution to draw from and to labels on edges
Thanks in advance, Abhi
Has the concept of a labelFrom, labelMiddle, and labelTo been implemented at all? I haven't found a solid example where I can draw a node and have it's local interface displayed while the remote interface is nearest the remote node.