Leo Silva
Leo Silva

Reputation: 11

JointJS links automatic layout

i've been working with JointJS to make a call graph. In my test case, I have 83 nodes, with links between them. After creating all elements, i`m using Dagre DirectedGraph to layout the diagram.

The question is: some of my links are going over the nodes and they are not perpendicular. There is some algorythm or some solution that solves this problem?

PS.: i tried to use TreeLayout, but unsuccessful.

Upvotes: 1

Views: 1727

Answers (1)

Vinay Prabhakaran
Vinay Prabhakaran

Reputation: 773

you could try making links of manhattan router type.

var link = new joint.dia.Link({
    source: { id: source.id },
    target: { id: target.id },
    router: { name: 'manhattan' },
    }
});

Upvotes: 3

Related Questions