Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid edge-node overlapping in cytoscape.js

Tags:

cytoscape.js

Created graph using cytoscape.js. I have set the layout to 'grid'. Need to resolve following problem: original graph-

enter image description here

There is edge from Host3 to Host1 as well as from Host5 to host1,Edge from Host 5 to Host 1 overlapping the edge from Host3 to Host1.

Overlapping edge should appear like:

enter image description here

How to do it? Thanks !

like image 733
smita chougale Avatar asked Feb 16 '15 11:02

smita chougale


1 Answers

That's a research problem in graph theory. You can

(1) use a different layout or parameters, or

(2) develop a layout with less overlap for your specific usecase, or

(3) invent and/or implement novel edge overlap avoidance algorithms.

like image 193
maxkfranz Avatar answered Oct 16 '22 10:10

maxkfranz