mirror of
https://gitee.com/antv/g6.git
synced 2024-12-05 05:09:07 +08:00
15 lines
685 B
Markdown
15 lines
685 B
Markdown
---
|
|
title: Dagre Layout
|
|
order: 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](/zh/docs/manual/middle/layout/#%E5%AD%90%E5%9B%BE%E5%B8%83%E5%B1%80). 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 from left to right.
|
|
- Example 3 : Translate the layout parameters in dynamic.
|