dagre-d3
还包括 lo-dash
,所以这可能是大小的原因。dagre
本身作为布局模块,你可以找到使用它与 d3
的方法 - 在我看来,这是最好的开源分层/有向无环图布局。 - MarcoL可能已经晚了,但这对于其他搜索类似信息的人可能是相关的...
Elkjs支持分层图布局,并且似乎在此时仍在积极维护。
一些基于OP用例的建议布局选项...
layoutOptions: {
'org.eclipse.elk.algorithm': 'layered',
'org.eclipse.elk.direction' : 'DOWN',
'org.eclipse.elk.edgeRouting': 'SPLINES',
'org.eclipse.elk.layered.edgeRouting.sloppySplineRouting': false,
'org.eclipse.elk.layered.layering.strategy': 'INTERACTIVE' }