The NodeOrderComparer compares edges according to a specified order.
Remarks
It obtains the order from a IDataProvider registered with the graph with key NODE_ORDER_COMPARABLE_DP_KEY.
Various tree layout algorithms can use this IComparer<T> to influence the resulting layout. To achieve this, use this comparator and assign it to the comparator property of the layout algorithm classes.
Type Details
- yfiles module
- layout-tree
- yfiles-umd modules
- layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
- Legacy UMD name
- yfiles.tree.NodeOrderComparer
See Also
ClassicTreeLayout.comparer,
TreeLayout.defaultOutEdgeComparer,
TreeLayout.OUT_EDGE_COMPARER_DP_KEY,
BalloonLayout.comparer,
AspectRatioTreeLayout.comparer,
NodeOrderComparer.NODE_ORDER_COMPARABLE_DP_KEY,
Sorting Child Nodes,
Incremental Layout
Constructors
Creates a new NodeOrderComparer instance.
Methods
Compares two edges according to their index in the order specified using a IDataProvider.
Remarks
Target nodes for which the IDataProvider registered with NODE_ORDER_COMPARABLE_DP_KEY returns
null
or an Object that does not implement IComparable are treated as being smaller than other target nodes.Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
See Also
Constants
A data provider key for registering an order for each node in the graph.
Domain | YNode | |
Values | IComparable | a |