dagrejs / dagre-d3

A D3-based renderer for Dagre

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2 Line Connection, Possible?

loblab opened this issue · comments

Is it possible to make a 2-line (or more) connection in same direction from A to B using dagre-d3? Thanks.

image

Just got a similar situation, found a solution from other issue.

Add the config when create the graph
var graph = new dagreD3.graphlib.Graph({ multigraph: true });
Add a name identifier when set the edge
graph.setEdge('A', 'B', 'Label', 'edge1') or graph.setEdge('A', 'B', {label: 'Label'}, 'edge2')

刚刚遇到类似的情况,从其他问题中找到了解决方案。

在创建图形时添加配置在
var graph = new dagreD3.graphlib.Graph({ multigraph: true });
设置边线时添加名称标识符
graph.setEdge('A', 'B', 'Label', 'edge1')graph.setEdge('A', 'B', {label: 'Label'}, 'edge2')

Just met with this question, see your answer, thank you very much