g6/packages/site/examples/net/circular/index.en.md

17 lines
793 B
Markdown
Raw Normal View History

2023-02-02 10:31:36 +08:00
---
title: Circular Layout
order: 4
---
Circular layout orders the nodes according to the configuration, and then places the nodes on a circle.
## Usage
As the demo below, you can deploy it in `layout` while instantiating Graph. it can also be used for [Subgraph Layout](/en/docs/manual/middle/layout/sub-layout). By tuning the configurations, you can adjust the radius, start angle, end angle, nodes' order method, divisions, spiral style, and so on.
- Example 1 : Basic Circular Layout, the nodes are placed on the circle clockwise in the data order.
- Example 2 : The nodes are placed on the circle clockwise according to their degrees.
- Example 3 : Spiral layout.
- Example 4 : Divide the nodes into several divisions on the circle.
- Example 5 : Translate the parameters in dynamic.