--- title: Dendrogram Layout order: 10 --- ## Overview The dendrogram layout is suitable for visualizing hierarchical clustering data. Its feature is that all child nodes are laid out on the same level, node size is not considered, and each node is treated as 1px. Dendrogram Layout Example ## Configuration ```js const graph = new Graph({ layout: { type: 'dendrogram', direction: 'LR', nodeSep: 30, rankSep: 250, radial: false, }, }); ``` ## Options Dendrogram Layout Options Illustration | Property | Description | Type | Default | Required | | --------- | ------------------------------------------------------ | ------------------------------------------ | ------- | -------- | | type | Layout type | `dendrogram` | - | ✓ | | direction | Layout direction, [options](#direction) | `LR` \| `RL` \| `TB` \| `BT` \| `H` \| `V` | `LR` | | | nodeSep | Node spacing, distance between nodes on the same level | number | 20 | | | rankSep | Rank spacing, distance between different levels | number | 200 | | | radial | Whether to enable radial layout, [see below](#radial) | boolean | false | | ### direction Tree layout direction options: - `TB`: Root at the top, layout downward TB direction - `BT`: Root at the bottom, layout upward BT direction - `LR`: Root at the left, layout to the right LR direction - `RL`: Root at the right, layout to the left RL direction - `H`: Root in the middle, horizontal symmetric layout H direction - `V`: Root in the middle, vertical symmetric layout V direction ### radial Whether to enable radial layout mode. When enabled, nodes are distributed radially around the root node. If `radial` is set to `true`, it is recommended to set `direction` to `'LR'` or `'RL'` for best results. Radial Layout