A HierarchicLayoutBusDescriptor defines settings for edges routed on a common bus and forming a bus substructure for HierarchicLayout.
Remarks
Edges mapped to the same HierarchicLayoutBusDescriptor instance, adjacent to a common root node and having the same edge direction form a bus. The mapping is retrieved from a IDataProvider registered with the input graph with key BUS_DESCRIPTOR_DP_KEY.
Default Values of Properties
maximumNodesAfterBus | 0 | If the maximum number of nodes before the bus is 0 too, then the number of nodes is unrestricted, otherwise all nodes are placed before the bus. |
maximumNodesBeforeBus | 0 | If the maximum number of nodes after the bus is 0 too, then the number of nodes is unrestricted, otherwise all nodes are placed after the bus. |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.BusDescriptor
See Also
Constructors
Creates a new instance of a HierarchicLayoutBusDescriptor with the default values.
Parameters
A map of options to pass to the method.
- maximumNodesBeforeBus - number
The maximum number of nodes in a layer that are placed before the common bus segment. This option sets the maximumNodesBeforeBus property on the created object.
- maximumNodesAfterBus - number
The maximum number of nodes in a layer that are placed after the common bus segment. This option sets the maximumNodesAfterBus property on the created object.
Properties
Gets or sets the maximum number of nodes in a layer that are placed after the common bus segment.
Remarks
0
which means that the nodes are equally distributed and the common bus segment is placed in the middle. The actual number of nodes before and after the bus is determined automatically in that case.Default Value
0
.If the maximum number of nodes before the bus is 0
too, then the number of nodes is unrestricted, otherwise all nodes are placed before the bus.
Throws
- Exception({ name: 'ArgumentError' })
- if the given node count is negative
See Also
Sample Graphs
0
, then the maximum will be exceeded as necessary. The maximum can also be exceeded if there are too many fixed bus nodes in the same layer (when running in incremental mode) or when bus layers are user-specified via ROOT_OFFSET_DP_KEY.Gets or sets the maximum number of nodes in a layer that are placed before the common bus segment.
Remarks
0
which means that the nodes are equally distributed and the common bus segment is placed in the middle. The actual number of nodes before and after the bus is determined automatically in that case.Default Value
0
.If the maximum number of nodes after the bus is 0
too, then the number of nodes is unrestricted, otherwise all nodes are placed after the bus.
Throws
- Exception({ name: 'ArgumentError' })
- if the given node count is negative
See Also
Sample Graphs
0
, then the maximum will be exceeded as necessary. The maximum can also be exceeded if there are too many fixed bus nodes in the same layer (when running in incremental mode) or when bus layers are user-specified via ROOT_OFFSET_DP_KEY.Constants
A data provider key for assigning nodes to a specific side of the common bus.
Remarks
Domain | YNode | nodes that belong to a bus |
Values | boolean | true if the node should be placed before the bus, false if it should be placed after the bus |
See Also
A data provider key for assigning nodes to specific layers relative to the root node of the bus.
Remarks
i
specified for a bus node is interpreted relative to the root node as follows, assuming that the root node is in layer x
.- If the bus is placed in the layers after the root, the bus node will be placed in layer
x + i
- If the bus is placed in the layers before the root, the bus node will be placed in layer
x - i
Domain | YNode | nodes that belong to a bus |
Values | number | an integer value greater than or equal to 1 representing the layer offset with respect to the layer of the root node of the bus that this node belongs to |
See Also
2
, 10
, 15
are normalized to 1
, 2
, 3
).