A SubgraphLayoutStage is an ILayoutStage that filters out all graph elements that are not part of a specific subgraph.
Remarks
The nodes that induce this subgraph can be defined via property subgraphNodes. They will be arranged by the coreLayout.
Optionally, the edges that are included in the subgraph can explicitly be defined via property subgraphEdges. This feature is useful to exclude specific edges from being handled by the coreLayout. If no provider is registered, all edges are included.
In the same way it is also possible to include/exclude node labels or edge labels via properties subgraphNodeLabels and subgraphEdgeLabels.
Default Values of Properties
coreLayout | null |
Type Details
- yFiles module
- algorithms
Constructors
Creates a new SubgraphLayoutStage instance with an optional coreLayout.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- The core layout algorithm.
- enabled - boolean
Properties
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Gets or sets a value that determines whether this stage should do anything but execute the coreLayout.
Remarks
By default, when constructed, stages should be enabled. Users may disable a stage's functionality by setting this property to false
.
Stages that can guarantee that the graph will not change can choose to not even execute the coreLayout when disabled.
Implements
Methods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- The graph to apply the layout to.
Implements
Delegates the arrangement of the specified subgraph of the given graph to the coreLayout.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- The input graph
Implements
createLayoutData
(graph: LayoutGraph) : SubgraphLayoutStageData<LayoutNode,LayoutEdge,LayoutNodeLabel,LayoutEdgeLabel>Returns an instance of LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> that can be used to perform item-specific configurations for the SubgraphLayoutStage.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph that determines the generic type arguments of the created layout data
Returns
- ↪SubgraphLayoutStageData<LayoutNode,LayoutEdge,LayoutNodeLabel,LayoutEdgeLabel>
- an instance of layout data that can be used to perform item-specific configurations for the given SubgraphLayoutStage.
Returns an instance of LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> that can be used to perform item-specific configurations for the SubgraphLayoutStage.
Remarks
Parameters
A map of options to pass to the method.
- graph - IGraph
- the graph that determines the generic type arguments of the created layout data
Returns
- ↪SubgraphLayoutStageData<INode,IEdge,ILabel,ILabel>
- an instance of layout data that can be used to perform item-specific configurations for the given SubgraphLayoutStage.
LayoutExecutor
type is available at runtime.Constants
A data key for marking edge labels that are included in the subgraph, thus, visible during the core layout.
Remarks
true
to a label if it should be included, or false
if it should be excluded and hidden during the core layout.See Also
A data key for marking edges that are included in the subgraph, thus, visible during the core layout.
Remarks
true
to an edge if the edge should be included, or false
if it should be excluded and hidden during the core layout.See Also
A data key for marking node labels that are included in the subgraph, thus, visible during the core layout.
Remarks
true
to a label if it should be included, or false
if it should be excluded and hidden during the core layout.See Also
A data key for marking nodes that are included in the subgraph, thus, visible during the core layout.
Remarks
true
to a node if the node should be included, or false
if it should be excluded and hidden during the core layout.