neo4j-contrib / neovis.js

Neo4j + vis.js = neovis.js. Graph visualizations in the browser with data from Neo4j.
Apache License 2.0
1.59k stars 324 forks source link

Overlapped relationships when we have multiple relationships between same pair of nodes #350

Open burhanqayoom opened 1 year ago

burhanqayoom commented 1 year ago

Expected Behavior (Mandatory)

I have a neo4j graph that i am displaying in hierarchical mode. I have a scenario where i have multiple relationships between a pair of nodes. I am expecting the relationships to not overlap

Actual Behavior (Mandatory)

however, the relationships are overlapping in that case. I tried to add avoidOverlap i hierarchical, but seems that doesn't work for hierarchical.

How to Reproduce the Problem

Simple Example

Datasets and Statements

Screenshots (where it's possibile)

Specifications (Mandatory)

Currently used versions

Versions

thebestnom commented 1 year ago

Hm... That's a vis-network problem, searching online I found https://visjs.github.io/vis-network/examples/network/layout/hierarchicalLayoutOverlapAvoidance.html https://stackoverflow.com/questions/46880063/how-to-avoid-network-graph-nodes-overlapping So that's avoidOverlap gets a number and you can put it higher for better overlap avoidness But not tested myself 😅

burhanqayoom commented 1 year ago

this is for nodes overlapping. I need the parameter to avoid relationship overlapping

I am currently getting it like this.

thebestnom commented 1 year ago

Maybe this? https://github.com/visjs/vis-network/issues/1546

burhanqayoom commented 1 year ago
Screenshot 2023-06-14 141329
burhanqayoom commented 1 year ago

These are multiple links and their labels as well are getting overlapped

NudistBeaaach commented 1 year ago

Did your find any solutions to this problem ? I'm facing the same issue, avoidOverlap works well on nodes but n-edges between two same nodes are overlaping.