dash14 / v-network-graph

An interactive network graph visualization component for Vue 3
https://dash14.github.io/v-network-graph/
MIT License
485 stars 44 forks source link

Add label zOrder configuration #87

Closed lucagrammer closed 1 year ago

lucagrammer commented 1 year ago

Hi, thanks for this great and very useful library. I would like to suggest a very small improvement that would greatly improve the usability, which is often compromised when using paths. Indeed, paths are the last element rendered on the SVG and therefore they cover the labels associated with the nodes, making them unreadable.

My suggestion is to change the rendering order or provide a zOrder option in configs to change it. In fact there is no other way (css z-index doesn't work with SVGs) to alter this property.

Schermata 2022-09-12 alle 13 31 20

Thank you very much!

dash14 commented 1 year ago

Hi @lucagrammer, Thank you for suggesting a nice feature! Sorry for the delay, but I have implemented and released this feature. (v0.8.1) Targets not only labels but also built-in layers such as nodes and focus rings, allowing the order of layers to be changed. For more details, please refer to the example. https://dash14.github.io/v-network-graph/examples/layers.html#change-the-order-of-built-in-layers

Thank you very much for your support!

lucagrammer commented 1 year ago

Thank you very much for your work