PartitionLayout provides a framework for layouts that are based on a divide and conquer approach.
Remarks
Concept
The approach can be subdivided into four stages:
- The input graph is partitioned into smaller units. Implementations of this phase can be set using method partitionFinder.
- Optionally, the layout algorithm arranges each partition. Implementations of this phase can be set using method coreLayout.
- The graph partitions are arranged next to each other keeping their layout. Implementations of this phase can be set using method partitionPlacer.
- Edges that connect nodes in different graph partitions will be routed. Implementations of this phase can be set using method interEdgeRouter
Default Values of Properties
interEdgeRouter | null | |
partitionFinder | null | |
partitionPlacer | null |
Type Details
- yfiles module
- router-polyline
- yfiles-umd modules
- layout-area, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-polyline
- Legacy UMD name
- yfiles.layout.PartitionLayout
Constructors
Creates a new PartitionLayout instance with default settings.
Parameters
A map of options to pass to the method.
- partitionFinder - IPartitionFinder
The IPartitionFinder instance that is responsible for partitioning the input graph. This option sets the partitionFinder property on the created object.
- partitionPlacer - IPartitionPlacer
The IPartitionPlacer instance that is responsible for arranging the graph partitions. This option sets the partitionPlacer property on the created object.
- interEdgeRouter - IPartitionInterEdgeRouter
The IPartitionInterEdgeRouter instance that is responsible for inter-edge routing. This option sets the interEdgeRouter property on the created object.
- coreLayout - ILayoutAlgorithm
The core layout algorithm that is wrapped by this stage. This option sets the coreLayout property on the created object.
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets the IPartitionInterEdgeRouter instance that is responsible for inter-edge routing.
Default Value
null
.Gets or sets the IPartitionFinder instance that is responsible for partitioning the input graph.
Default Value
null
.Gets or sets the IPartitionPlacer instance that is responsible for arranging the graph partitions.
Default Value
null
.Methods
Arranges and places independent partitions in the graph.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
Throws
- Exception({ name: 'InvalidOperationError' })
- if the partition finder is
null
See Also
Implements
Invokes the layout process of the core layout algorithm.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Defined in
Static Methods
Creates a IPartitionPlacer that uses ComponentLayout to place the partitions.
Parameters
A map of options to pass to the method.
- componentLayout - ComponentLayout
- An optional ComponentLayout to use.
createEdgeBetweennessPartitionFinder
(minimumPartitionCount?: number, maximumPartitionCount?: number) : IPartitionFinderCreates a IPartitionFinder that uses edgeBetweennessClustering as strategy for finding graph partitions.
Parameters
A map of options to pass to the method.
- minimumPartitionCount - number
- The minimum number of partitions the result should have.
- maximumPartitionCount - number
- The maximum number of partitions the result should have.