vis-network icon indicating copy to clipboard operation
vis-network copied to clipboard

Support for multiple labels on one edge

Open Triet opened this issue 5 years ago • 10 comments

Edges can only have 1 label. I want to request multiple labels on an edge. This will be useful for single bidirectional edge.

Triet avatar Sep 16 '19 17:09 Triet

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.

Thomaash avatar Sep 16 '19 17:09 Thomaash

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.

Triet avatar Sep 16 '19 17:09 Triet

I also vote for this improvement, on the network diagrams, the signatures under the interfaces should be

Vladimir-Ilyin avatar May 06 '20 11:05 Vladimir-Ilyin

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

Vladimir-Ilyin avatar May 06 '20 13:05 Vladimir-Ilyin

I also vote for this improvement. We need at list three labels. "From", "Center", "To"

bojika avatar Sep 07 '20 08:09 bojika

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 avatar Nov 11 '20 00:11 RicoSuter

@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.

pdugas avatar Nov 11 '20 13:11 pdugas

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.

shura-i avatar Sep 04 '21 17:09 shura-i

Is this requirement Implemented? Please share the if someone has any solution to draw from and to labels on edges

Thanks in advance, Abhi

abhinandhanreddyk avatar Feb 13 '23 14:02 abhinandhanreddyk

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.

waukeerules avatar Apr 13 '24 04:04 waukeerules