visjs / vis-network

:dizzy: Display dynamic, automatically organised, customizable network views.
https://visjs.github.io/vis-network/
Apache License 2.0
3.04k stars 370 forks source link

Ability to set z-index of edge labels #1035

Open charleshtrenholm opened 4 years ago

charleshtrenholm commented 4 years ago

I was wondering if it was possible to be able to set the z-axis of edge labels, so that the appear above or below other elements in the network. In my particular case I have a lot of connecting nodes with edges that have text when you hover over it and it is difficult to read the labels because they are placed below the nodes.

I have looked at the examples and docs and have seen nothing similar to this. I tried a workaround where I would use multi: 'html' in the edge.font configuration, but it looks like by design it will not attempt to parse elements with attributes.

It would be nice to be able to specify at what layer I want the edges to appear in front of. Does such a feature or workaround already exist? A link demonstrating what I'm after is below.

One of the examples with long edge label text to demonstrate the issute

charleshtrenholm commented 4 years ago

Essentially just looking for a way to have the edge text appear above the nodes they are connected to. Any help would be appreciated!