g6/packages/site/examples/net/dagreFlow/index.en.md
2023-02-02 10:31:36 +08:00

759 B

title order
Dagre Layout 1

Dagre Layout is an appropriate layout method for directed flow graph. It will calculate the levels and positions of nodes automatically according to the edge directions in the data.

Usage

As the demo below, you can deploy it in layout while instantiating Graph. it can also be used for Subgraph Layout. By tuning the parameters, you can adjust the layout direction, node alignment, node separation, level separation, and so on.

  • Example 1 : Simple dagre layout.
  • Example 2 : Dagre Layout with combos.
  • Example 3 : Dagre layout from left to right and align top.
  • Example 4 : Dagre layout from left to right.
  • Example 5 : Translate the layout parameters in dynamic.