This layout algorithm arranges graphs in an organic fashion.
Remarks
Layout Style
The organic layout style is characterized by a natural distribution of nodes that exhibits clusters and symmetric properties of the graph. Nodes are placed space-saving, close to their adjacent nodes. Edges maintain uniform lengths and are routed with straight-line segments without bends.
Organic diagrams are commonly used for visualizing relations in large networks for example in bioinformatics, enterprise networking, visualizing social networks, mesh visualization or system management.
Concept
OrganicLayout uses a force-directed approach to place the nodes of the input graph. According to this approach, the graph is modeled as a physical system with appropriate forces acting on it. Nodes are considered as electrically charged particles with mutually repulsive forces. Edges are modeled as springs that attract adjacent nodes. A good diagram is obtained from an equilibrium state of the system, i.e., the nodes are rearranged based on the physical forces until the system reaches a (local) minimum of the sum of the forces.
Features
Quality-Time-Ratio
The ratio between the layout quality and the running time is conveniently adjustable.
Partition Grid
This layout algorithm is able to consider a PartitionGrid structure. However, for common nodes (i.e. non-group nodes) it only considers single partition cells. Furthermore, the layout algorithm will throw a InvalidGraphStructureError if there is a partition grid and the descendants of a group node are assigned to different partition grid cells or if there are group nodes that are associated with a group node mode other than NORMAL.
Avoidance of Node Edge Overlaps
The layout can be configured such that overlaps between edges and nodes are avoided. However, it doesn't guarantee that they won't appear in the resulting layout. To avoid overlaps, it is possible to route the edges afterwards using an edge routing algorithm, e.g., OrganicEdgeRouter.
Maximum Duration
OrganicLayout allows restricting the maximum duration which may be a suitable option to reduce the runtime required for large graphs. Note that restricting the maximum duration may result in a lower layout quality. Furthermore, the actual runtime may exceed the maximum duration since the layout algorithm still has to find a valid solution.
Substructures
The algorithm is also able to detect certain types of substructures in a graph (i.e., chains, stars, cycles, parallel, tree and group structures), and arrange these structures with special-purpose layout styles. Using substructure styles ensures that the corresponding structures are easily recognized in the graph. For the detection of substructures, it is optionally possible to consider node types, such that only nodes of the same user-defined type can form a substructure.
Constraints
The placement of the nodes can be influenced and restricted by additional constraints. Among others, the layout supports the following constraints; for more constraints see createConstraintFactory and OrganicLayoutConstraintFactory.
Default Values of Properties
automaticGroupNodeCompaction | true | Automatic group node compaction is enabled. |
clusteringPolicy | NONE
| Automatic clustering is disabled. |
compactnessFactor | 0.5 | |
considerNodeLabels | false | Node labels are not considered. |
considerNodeSizes | false | Points will be used for modeling the nodes. |
create3DLayout | false | The layout algorithm doesn't produce a 3D result. |
deterministic | false | The layout algorithm is non-deterministic. |
groupBoundsCalculator | MinimumSizeGroupBoundsCalculator
| |
groupNodeCompactness | 0.4 | |
hideGroupsStageEnabled | false | The stage responsible for hiding group nodes is activated. |
integratedEdgeLabeling | false | Integrated edge labeling is disabled. |
maximumDuration | 30000 | |
minimumNodeDistance | 0 | |
nodeEdgeOverlapAvoided | false | Overlaps between nodes and edges are not avoided. |
nodeOverlapsAllowed | false | Node overlaps are not allowed. |
orientationLayoutEnabled | true | The orientation |
outputRestriction | NONE
| |
preferredEdgeLength | 40 | |
qualityTimeRatio | 0.6 | |
scope | ALL
| |
smartComponentLayout | false | Smart component layout is disabled. |
Type Details
- yfiles module
- layout-organic
- yfiles-umd modules
- layout-multipage, layout-organic, layout
- Legacy UMD name
- yfiles.organic.OrganicLayout
See Also
Constructors
Creates a new OrganicLayout instance with default settings.
Parameters
A map of options to pass to the method.
- circleRecognition - boolean
Whether or not the layout algorithm tries to force nodes of cycles on geometric circles. This option sets the circleRecognition property on the created object.
- chainRecognition - boolean
Whether or not the layout algorithm tries to straighten paths of degree-2 nodes. This option sets the chainRecognition property on the created object.
- create3DLayout - boolean
Whether or not the layout algorithm should create a 3D result. This option sets the create3DLayout property on the created object.
- groupNodeCompactness - number
The compactness of group nodes. This option sets the groupNodeCompactness property on the created object.
- automaticGroupNodeCompaction - boolean
Whether or not group nodes are compacted automatically. This option sets the automaticGroupNodeCompaction property on the created object.
- clusterNodes - boolean
Whether or not a clustering algorithm is applied to the input graph. This option sets the clusterNodes property on the created object.
- clusteringQuality - number
The quality measure of the edge betweenness clustering algorithm if it is chosen as clustering policy. This option sets the clusteringQuality property on the created object.
- clusteringPolicy - OrganicLayoutClusteringPolicy
The clustering policy that is applied to the input graph and before executing the arrangement algorithm. This option sets the clusteringPolicy property on the created object.
- clusterAsGroupSubstructureAllowed - boolean
Whether or not detected clusters are taken into account as group substructures. This option sets the clusterAsGroupSubstructureAllowed property on the created object.
- considerNodeLabels - boolean
Whether or not to reserve space for node labels during layout calculation. This option sets the considerNodeLabels property on the created object.
- integratedEdgeLabeling - boolean
Whether or not the layout algorithm will place edge labels. This option sets the integratedEdgeLabeling property on the created object.
- groupBoundsCalculator - ILayoutGroupBoundsCalculator
The ILayoutGroupBoundsCalculator instance used for calculating the size of group nodes. This option sets the groupBoundsCalculator property on the created object.
- smartComponentLayout - boolean
Whether or not this instance should configure the ComponentLayout to respect subsets of nodes. This option sets the smartComponentLayout property on the created object.
- nodeEdgeOverlapAvoided - boolean
Whether or not the layout algorithm tries to avoid node/edge overlaps. This option sets the nodeEdgeOverlapAvoided property on the created object.
- orientationLayoutEnabled - boolean
Whether or not the ILayoutStage that modifies the orientation of the layout is activated. This option sets the orientationLayoutEnabled property on the created object.
- qualityTimeRatio - number
The ratio of layout quality versus running time. This option sets the qualityTimeRatio property on the created object.
- maximumDuration - number
The maximum duration in milliseconds that this layout algorithm is allowed to run. This option sets the maximumDuration property on the created object.
- scope - OrganicLayoutScope
The scope that determines which nodes are placed by this algorithm. This option sets the scope property on the created object.
- chainSubstructureStyle - ChainSubstructureStyle
The style specifier for chain substructures. This option sets the chainSubstructureStyle property on the created object.
- cycleSubstructureStyle - CycleSubstructureStyle
The style specifier for cycle substructures. This option sets the cycleSubstructureStyle property on the created object.
- parallelSubstructureStyle - ParallelSubstructureStyle
The style specifier for parallel substructures. This option sets the parallelSubstructureStyle property on the created object.
- parallelSubstructureTypeSeparation - boolean
Whether parallel substructures should be separated by the node type. This option sets the parallelSubstructureTypeSeparation property on the created object.
- starSubstructureTypeSeparation - boolean
Whether star substructures should be separated by the node type. This option sets the starSubstructureTypeSeparation property on the created object.
- starSubstructureStyle - OrganicLayoutStarSubstructureStyle
The style specifier for star substructures. This option sets the starSubstructureStyle property on the created object.
- treeSubstructureStyle - OrganicLayoutTreeSubstructureStyle
The style specifier for tree substructures. This option sets the treeSubstructureStyle property on the created object.
- groupSubstructureScope - OrganicLayoutGroupSubstructureScope
The scope specifier for group substructures. This option sets the groupSubstructureScope property on the created object.
- cycleSubstructureSize - number
The minimum size (number of nodes) a cycle needs to have to be detected and handled as a cycle substructure. This option sets the cycleSubstructureSize property on the created object.
- chainSubstructureSize - number
The minimum size (number of nodes) a chain needs to have to be detected and handled as a chain substructure. This option sets the chainSubstructureSize property on the created object.
- parallelSubstructureSize - number
The minimum size (number of nodes) a parallel structure needs to have to be detected and handled as a parallel substructure. This option sets the parallelSubstructureSize property on the created object.
- starSubstructureSize - number
The minimum size (number of nodes including the root) a star needs to have to be detected and handled as a star substructure. This option sets the starSubstructureSize property on the created object.
- treeSubstructureSize - number
The minimum size (number of nodes) a tree needs to have to be detected and handled as a tree substructure. This option sets the treeSubstructureSize property on the created object.
- groupSubstructureSize - number
The minimum size (number of nodes) a group needs to have to be detected and handled as a group substructure. This option sets the groupSubstructureSize property on the created object.
- compactnessFactor - number
The compactness factor for the layout algorithm. This option sets the compactnessFactor property on the created object.
- preferredEdgeLength - number
The default preferred edge length. This option sets the preferredEdgeLength property on the created object.
- preferredMinimumNodeToEdgeDistance - number
The minimum preferred distance between nodes and edges when node-edge overlaps are not allowed. This option sets the preferredMinimumNodeToEdgeDistance property on the created object.
- considerNodeSizes - boolean
Whether or not to consider node sizes during layout calculation. This option sets the considerNodeSizes property on the created object.
- deterministic - boolean
Whether or not the deterministic mode of this algorithm is enabled. This option sets the deterministic property on the created object.
- minimumNodeDistance - number
The minimum node distance that this algorithm should enforce between all pairs of nodes. This option sets the minimumNodeDistance property on the created object.
- nodeOverlapsAllowed - boolean
Whether or not overlaps between nodes are allowed. This option sets the nodeOverlapsAllowed property on the created object.
- outputRestriction - OutputRestriction
The area restriction for the result of the layout algorithm. This option sets the outputRestriction property on the created object.
- labeling - ILayoutStage
The ILayoutStage that places the labels of the input graph. This option sets the labeling property on the created object.
- selfLoopRouter - ILayoutStage
The ILayoutStage that routes self-loops. This option sets the selfLoopRouter property on the created object.
- parallelEdgeRouter - ILayoutStage
The ILayoutStage that routes parallel edges. This option sets the parallelEdgeRouter property on the created object.
- componentLayout - ILayoutStage
The ILayoutStage that arranges the connected components of an input graph. This option sets the componentLayout property on the created object.
- subgraphLayout - ILayoutStage
The ILayoutStage that constrains the layout process to a subgraph of the input graph. This option sets the subgraphLayout property on the created object.
- hideGroupsStage - ILayoutStage
The ILayoutStage that hides the group nodes of the input graph. This option sets the hideGroupsStage property on the created object.
- orientationLayout - ILayoutStage
The ILayoutStage that modifies the orientation of a computed layout. This option sets the orientationLayout property on the created object.
- layoutOrientation - LayoutOrientation
The main orientation of the layout. This option sets the layoutOrientation property on the created object.
- selfLoopRouterEnabled - boolean
Whether or not the ILayoutStage used for routing self-loops is activated. This option sets the selfLoopRouterEnabled property on the created object.
- labelingEnabled - boolean
Whether or not the ILayoutStage used for placing the labels of the input graph is activated. This option sets the labelingEnabled property on the created object.
- hideGroupsStageEnabled - boolean
Whether or not the ILayoutStage used for hiding group nodes is activated. This option sets the hideGroupsStageEnabled property on the created object.
- componentLayoutEnabled - boolean
Whether or not the ILayoutStage used for arranging the components of the graph is activated. This option sets the componentLayoutEnabled property on the created object.
- parallelEdgeRouterEnabled - boolean
Whether or not the ILayoutStage used for routing parallel edges is activated. This option sets the parallelEdgeRouterEnabled property on the created object.
- subgraphLayoutEnabled - boolean
Whether or not the ILayoutStage used for constraining the layout process to a subgraph of the input graph is activated. This option sets the subgraphLayoutEnabled property on the created object.
Properties
Gets or sets whether or not group nodes are compacted automatically.
Remarks
Default Value
true
.Automatic group node compaction is enabled.
See Also
Gets or sets whether or not the layout algorithm tries to straighten paths of degree-2 nodes.
Remarks
Default Value
false
.Chains are not automatically recognized and straightened.
See Also
Sample Graphs
Gets or sets the minimum size (number of nodes) a chain needs to have to be detected and handled as a chain substructure.
Gets or sets the style specifier for chain substructures.
Remarks
A chain is a simple edge path where the degree of the nodes is less than or equal to 2
. Use property chainSubstructureSize to specify the minimum size a chain must have.
If there are user-defined node types, a chain substructure contains only nodes of the same type or only nodes without a type (i.e. null
as type). This way, node types can be used to control which elements are allowed to form a substructure.
Default Value
NONE.Throws
- Exception({ name: 'ArgumentError' })
- if the given style is unknown
See Also
Gets or sets whether or not the layout algorithm tries to force nodes of cycles on geometric circles.
Remarks
Default Value
false
.Cycles are not automatically recognized and forced on geometric circles.
See Also
Sample Graphs
Gets or sets whether or not detected clusters are taken into account as group substructures.
Default Value
false
.See Also
Sample Graphs
Gets or sets the clustering policy that is applied to the input graph and before executing the arrangement algorithm.
Remarks
By default, no clustering is applied, that is, NONE is set.
When a policy other than NONE is specified, the following steps are performed during the layout:
- A clustering algorithm is applied to the input graph.
- All nodes of the same cluster are put into a newly created group node.
- The layout is applied to the modified graph.
- Group nodes denoting clusters (inserted during step
2
) are removed.
The user can also specify customized clusters by defining appropriate groups.
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown clustering policy is given
Gets or sets the quality measure of the edge betweenness clustering algorithm if it is chosen as clustering policy.
Remarks
The higher the value, the higher the clustering quality.
The value needs to lie in [0,1]
.
Default Value
1
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified quality measure is outside the interval
[0,1]
See Also
Gets or sets whether or not a clustering algorithm is applied to the input graph.
Remarks
Default Value
false
.Automatic clustering is disabled.
Deprecation warning
Use the clustering policy property instead to enable and disable automatic clustering. See the documentation for details.Gets or sets the compactness factor for the layout algorithm.
Remarks
Smaller values result in less compact drawings, greater values result in more compact drawings.
The compactness value needs to lie in [0,1]
.
Default Value
0.5
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified value is outside the interval
[0,1]
See Also
Sample Graphs
Gets or sets the ILayoutStage that arranges the connected components of an input graph.
Default Value
ComponentLayout.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for arranging the components of the graph is activated.
Remarks
Default Value
true
.The stage that arranges connected graph components is activated.
See Also
Defined in
Gets or sets whether or not to reserve space for node labels during layout calculation.
Default Value
false
.Node labels are not considered.
See Also
Sample Graphs
Gets or sets whether or not to consider node sizes during layout calculation.
Remarks
Default Value
false
.Points will be used for modeling the nodes.
See Also
Sample Graphs
Gets or sets whether or not the layout algorithm should create a 3D result.
Remarks
Default Value
false
.The layout algorithm doesn't produce a 3D result.
See Also
Gets or sets the minimum size (number of nodes) a cycle needs to have to be detected and handled as a cycle substructure.
Gets or sets the style specifier for cycle substructures.
Remarks
A cycle is a simple edge path where the first and last node are identical. The algorithm only considers cycles where the number of edges connecting nodes of the cycle with the remaining nodes is less than or equal to 2
. To define the minimum number of nodes a cycle must contain, use property cycleSubstructureSize (default is 4
).
If there are user-defined node types, a cycle substructure contains only nodes of the same type or only nodes without a type (i.e. null
as type). This way, node types can be used to control which elements are allowed to form a substructure.
Default Value
NONE.Throws
- Exception({ name: 'ArgumentError' })
- if the given style is unknown
See Also
Gets or sets whether or not the deterministic mode of this algorithm is enabled.
Remarks
Default Value
false
.The layout algorithm is non-deterministic.
See Also
Gets or sets the ILayoutGroupBoundsCalculator instance used for calculating the size of group nodes.
Default Value
MinimumSizeGroupBoundsCalculator.Throws
- Exception({ name: 'ArgumentError' })
- if the specified
is null
See Also
Gets or sets the compactness of group nodes.
Remarks
The compactness ranges from 0
to 1
where 0
results in group nodes not affecting the overall layout too much while 1
forces nodes in the same group to be clustered tightly.
The values need to lie in [0,1]
.
Default Value
0.4
.Throws
- Exception({ name: 'ArgumentError' })
- if specified compactness value is outside the interval
[0,1]
See Also
Sample Graphs
Gets or sets the scope specifier for group substructures.
Remarks
Group substructures that lie in the specified scope are treated as substructures in the layout process, i.e., the child nodes are arranged on a disk that is contained in the group node.
A group is a group substructure if it satsifies the following conditions.
- The group node does not contain any other group.
- The group node mode is NORMAL; see GROUP_NODE_MODE_DP_KEY.
- No node of the group is fixed.
- The group contains at least the specified minimum number of nodes
The scope specifiers indicate which group substructures are considered in the layout process.
Default Value
NO_GROUPS.Throws
- Exception({ name: 'ArgumentError' })
- if the given scope is unknown
See Also
Gets or sets the minimum size (number of nodes) a group needs to have to be detected and handled as a group substructure.
Gets or sets the ILayoutStage that hides the group nodes of the input graph.
Default Value
HideGroupsStage.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for hiding group nodes is activated.
Remarks
Default Value(Overrides the default value defined in MultiStageLayout)
false
.The stage responsible for hiding group nodes is activated.
See Also
Defined in
Gets or sets whether or not the layout algorithm will place edge labels.
Remarks
The applied strategy tries to ensure that the edges are long enough to place the associated labels without overlapping each other. However, the applied simulation-based algorithm cannot always guarantee such results. Furthermore, the labels of an edge can overlap with other graph elements, including labels of other edges. To further improve the labeling, consider applying a generic labeling algorithm as a post-processing step that reduces such overlaps, see labeling.
To obtain suitable results, the following points have to be considered:
- Both the side and angle of the labels has to be specified relative to the edge (i.e., angleReference is set to RELATIVE_TO_EDGE_FLOW and sideReference is set to RELATIVE_TO_EDGE_FLOW). Otherwise, the resulting side/angle of the labels may be wrong.
- If only a subset of nodes is placed, the algorithm only considers labels of edges with at least one movable endpoint (i.e., source or target node).
- Labels of edges that connect a group node with one of its parent groups are not supported. The same applies to labels of grouped edges that are part of a substructure.
- Self-loops and parallel edges are handled by the SelfLoopRouter and ParallelEdgeRouter respectively. Thus, labels of such edges are not considered by the algorithm.
This option depend on features of the layout-hierarchic
module, which is not a static dependency of this module for performance reasons. To make sure it's loaded, add the line Class.ensure(HierarchicLayout)
.
Default Value
false
.Integrated edge labeling is disabled.
Gets or sets the ILayoutStage that places the labels of the input graph.
Default Value
See Also
Defined in
Gets or sets whether or not the ILayoutStage used for placing the labels of the input graph is activated.
Remarks
Default Value
false
.The stage responsible for label placement is deactivated.
See Also
Defined in
Gets or sets the main orientation of the layout.
Remarks
Default Value
TOP_TO_BOTTOM.Throws
- Exception({ name: 'ArgumentError' })
- if the specified orientation does not match a default layout orientation
See Also
Defined in
Gets or sets the maximum duration in milliseconds that this layout algorithm is allowed to run.
Remarks
Default Value
30000
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified duration has a negative value
See Also
Gets or sets the minimum node distance that this algorithm should enforce between all pairs of nodes.
Remarks
Default Value
0
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified minimum node distance is negative
See Also
Sample Graphs
Gets or sets whether or not the layout algorithm tries to avoid node/edge overlaps.
Default Value
false
.Overlaps between nodes and edges are not avoided.
See Also
Gets or sets whether or not overlaps between nodes are allowed.
Default Value
false
.Node overlaps are not allowed.
See Also
Sample Graphs
Gets or sets the ILayoutStage that modifies the orientation of a computed layout.
Default Value
OrientationLayout.See Also
Defined in
Sets whether or not the ILayoutStage that modifies the orientation of the layout is activated.
Default Value
true
.The orientation
See Also
Overrides
Gets or sets the area restriction for the result of the layout algorithm.
Default Value
NONE.Throws
- Exception({ name: 'ArgumentError' })
- if the given restriction is
null
See Also
Sample Graphs
Gets or sets the ILayoutStage that routes parallel edges.
Default Value
ParallelEdgeRouter.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for routing parallel edges is activated.
Remarks
Default Value
true
.The stage that routes parallel edges is activated.
See Also
Defined in
Gets or sets the minimum size (number of nodes) a parallel structure needs to have to be detected and handled as a parallel substructure.
Remarks
Default Value
3
.Throws
- Exception({ name: 'ArgumentError' })
- if the given minimum size is less than
2
See Also
Gets or sets the style specifier for parallel substructures.
Remarks
A parallel structure consists of a set of nodes (called the inner nodes) such that all nodes have degree two and are connected to the same pair of neighbors (called the outer nodes).
Use property parallelSubstructureSize to specify the minimum number of inner nodes a structure must contain to be handled as a substructure.
If there are user-defined node types, a parallel substructure contains only nodes of the same type or only nodes without a type (i.e. null
as type). This way, node types can be used to control which elements are allowed to form a substructure.
Default Value
NONE.Throws
- Exception({ name: 'ArgumentError' })
- if the given style is unknown
See Also
Gets or sets whether parallel substructures should be separated by the node type.
Remarks
Default Value
true
.Parallel substructures are strictly separated by node type.
See Also
Sample Graphs
Gets or sets the default preferred edge length.
Remarks
If there is no specific preferred edge length assigned to an edge, this default preferred edge length is used.
The preferred edge length needs to be non-negative.
Default Value
40
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified edge length is negative
See Also
Sample Graphs
Gets or sets the minimum preferred distance between nodes and edges when node-edge overlaps are not allowed.
Remarks
Default Value
40
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified distance is negative
Gets or sets the ratio of layout quality versus running time.
Remarks
The larger the ratio, the better the quality of the resulting layout but the longer it may take to perform the layout calculation.
The value needs to lie within [0,1]
.
Default Value
0.6
.Throws
- Exception({ name: 'ArgumentError' })
- if the specified ratio is outside the interval
[0,1]
See Also
Gets or sets the scope that determines which nodes are placed by this algorithm.
Default Value
ALL.Throws
- Exception({ name: 'ArgumentError' })
- if the given scope is unknown
See Also
Gets or sets the ILayoutStage that routes self-loops.
Default Value
SelfLoopRouter.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for routing self-loops is activated.
Remarks
Default Value
true
.The stage that routes self-loops is activated.
See Also
Defined in
Gets or sets whether or not this instance should configure the ComponentLayout to respect subsets of nodes.
Remarks
Default Value
false
.Smart component layout is disabled.
See Also
Gets or sets the minimum size (number of nodes including the root) a star needs to have to be detected and handled as a star substructure.
Gets or sets the style specifier for star substructures.
Remarks
A star consists of a set of degree one nodes that are all connected to the same node (called the root of the star). Use property starSubstructureSize to define the minimum number of nodes, including the root, a star must contain to be detected as a substructure.
If there are user-defined node types, by default, a star substructure only contains nodes of the same type or only nodes without a type (i.e. null
as type), see starSubstructureTypeSeparation. This way, node types can be used to control which elements are allowed to form a substructure.
Default Value
NONE.Throws
- Exception({ name: 'ArgumentError' })
- if the given style is unknown
See Also
Gets or sets whether star substructures should be separated by the node type.
Remarks
Default Value
true
.Star substructures are strictly separated by node type.
See Also
Sample Graphs
Gets or sets the ILayoutStage that constrains the layout process to a subgraph of the input graph.
Default Value
SubgraphLayout.See Also
Defined in
Gets or sets whether or not the ILayoutStage used for constraining the layout process to a subgraph of the input graph is activated.
Remarks
Default Value
false
.The stage that constrains the input graph to a subgraph is deactivated.
See Also
Defined in
Gets or sets the style specifier for tree substructures.
Remarks
Use property treeSubstructureSize to define the minimum number of nodes, including the root, a tree must contain to be detected as a substructure.
If there are user-defined node types, a tree substructure contains only nodes of the same type or only nodes without a type (i.e. null
as type). This way, node types can be used to control which elements are allowed to form a substructure.
Default Value
NONE.Throws
- Exception({ name: 'ArgumentError' })
- if the given style is unknown
See Also
Methods
Appends the given ILayoutStage to the layout pipeline.
Remarks
Parameters
A map of options to pass to the method.
- stage - ILayoutStage
- the ILayoutStage instance to be added
See Also
Defined in
Calculates an organic arrangement of the graph.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Overrides
Calculates an organic arrangement of the graph.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
Implements
Checks the sizes of the nodes to be non-zero.
Parameters
A map of options to pass to the method.
- g - LayoutGraph
- The graph to check.
Defined in
Configures the given ComponentLayout to take fixed nodes in components into account.
Remarks
Components that contain fixed nodes will not be rearranged.
This method is called by applyLayout before the actual layout is calculated. It may be overridden in order to manually configure the ComponentLayout.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- layouter - ComponentLayout
- the ComponentLayout instance to reconfigure
See Also
Creates and returns a OrganicLayoutConstraintFactory instance that can be used for specifying additional constraints on the layout.
Remarks
Constraints modify the behavior of the organic layout algorithm for subsets of a graph, in order to introduce structures, relative positioning, or area restrictions on the positions of the nodes in the layout.
The created constraint factory is attached to the given graph. In case that an instance of the OrganicLayoutConstraintFactory is already attached to the graph, it will be removed and disposed.
Returns
- ↪OrganicLayoutConstraintFactory
- a OrganicLayoutConstraintFactory instance that can be used for specifying additional constraints on the layout.
Deactivates all predefined ILayoutStages so that upon applyLayout only the layout algorithm will be executed.
See Also
Defined in
Disposes of the ComponentLayout instance.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- layouter - ComponentLayout
- the ComponentLayout to reset
See Also
Prepends the given ILayoutStage to the layout pipeline.
Remarks
Parameters
A map of options to pass to the method.
- stage - ILayoutStage
- the ILayoutStage instance to be added
See Also
Defined in
Removes the given ILayoutStage from the layout pipeline.
Remarks
Parameters
A map of options to pass to the method.
- stage - ILayoutStage
- a ILayoutStage to be removed from the layout pipeline
See Also
Defined in
Constants
A data provider key for marking the nodes that are part of the relevant subset.
Domain | YNode | |
Values | boolean | true if the node is part of the subset, false or null otherwise |
See Also
A data provider key for specifying user-defined node clusters.
Remarks
Domain | YNode | |
Values | Object | the cluster ID of the node or null if the node does not belong to a cluster |
See Also
A data provider key for specifying the constraints of the nodes.
Remarks
Domain | Graph | the input graph |
Values | Object | a token that allows to bind a constraint factory |
A data provider key for specifying the directedness of edges.
Remarks
This IDataProvider key allows the user to specify hints on the directedness of edges. More precisely, a value of 1
indicates that the edge should be considered to be directed from source to target, a value of -1
that it is directed from target to source, and a value of 0
means that it is undirected.
The specifie values are considered during the detection of special substructures, see chainSubstructureStyle, cycleSubstructureStyle, parallelSubstructureStyle, treeSubstructureStyle and starSubstructureStyle.
Domain | Edge | the edges of the input graph |
Values | number | the directedness of the edge |
See Also
A data provider key for specifying the orientation of edges in the layout.
Remarks
Specifies whether or not the layout algorithm takes predefined directions of the edges into account.
This IDataProvider key allows the user to specify hints on the orientation of edges in the layout that is produced by the algorithm. More precisely, a positive value indicates that the edge should have the same orientation as the layout orientation, a negative value indicates that the edge should have the opposite orientation as the layout orientation, and a value of 0
means that the orientation can be set by the layout algorithm arbitrarily. See also layoutOrientation.
Domain | Edge | the edges of the input graph |
Values | number | the orientation of the edge |
See Also
Sample Graphs
A data provider key for specifying the minimum length of edges.
Domain | Edge | the edges of the input graph |
Values | number | the minimum length of the edge |
See Also
A data provider key for specifying the inertia of nodes.
Remarks
[0,1]
.1.0
: The node will not move.0.5
: The node will only move half as far as it would with an inertia of0.0
.0.0
: The node will move as fast as possible.
Domain | YNode | the nodes of the input graph |
Values | number | the inertia of the node |
See Also
0.0
, the algorithm considers the initial coordinates of the nodes (similar as for SUBSET).0.0
.A data provider key for specifying the stress of nodes.
Remarks
The stress value indicates how far a node will possibly move. The higher the stress of a node is, the farther it may move.
The stress can be specified for each non-group node if the scope is set to ALL. It is defined to be a value from the interval [0,1]
.
Domain | YNode | the nodes of the input graph |
Values | number | the stress of the node |
See Also
1.0
, the algorithm considers the initial coordinates of the nodes (similar as for SUBSET).1.0
.A data provider key for marking nodes that are allowed to overlap other nodes.
Domain | YNode | the nodes of the input graph |
Values | boolean | true if the node should be ignored during overlap removal, false otherwise |
See Also
A data provider key for defining an individual preferred length for each edge.
Domain | Edge | |
Values | number | a non-negative length for each edge or null to fallback to the default value |
See Also
A data acceptor key for publishing the z-coordinate for all non-group nodes in the graph.
Remarks
Domain | YNode | the nodes of the input graph |
Values | number | the z-coordinate of the node |