Specifies discrete positions for placing node labels with the GenericLabeling algorithm.
Remarks
The DiscreteNodeLabelPositions enum provides several predefined constants that represent various label positions around and within a node. These positions can be combined to allow flexibility in label placement, depending on the specific requirements of your graph layout.
Type Details
- yFiles module
- algorithms
See Also
Constants
Combined position that describes the positions outside the node at each of its corners.
Combined position that describes the nine node-internal positions.
See Also
DiscreteNodeLabelPositions.CENTER,
DiscreteNodeLabelPositions.TOP_INSIDE,
DiscreteNodeLabelPositions.BOTTOM_INSIDE,
DiscreteNodeLabelPositions.LEFT_INSIDE,
DiscreteNodeLabelPositions.RIGHT_INSIDE,
DiscreteNodeLabelPositions.TOP_LEFT_INSIDE,
DiscreteNodeLabelPositions.TOP_RIGHT_INSIDE,
DiscreteNodeLabelPositions.BOTTOM_LEFT_INSIDE,
DiscreteNodeLabelPositions.BOTTOM_RIGHT_INSIDE
Sample Graphs
Combined position that describes the positions outside the node.
See Also
DiscreteNodeLabelPositions.TOP,
DiscreteNodeLabelPositions.RIGHT,
DiscreteNodeLabelPositions.BOTTOM,
DiscreteNodeLabelPositions.LEFT,
DiscreteNodeLabelPositions.TOP_RIGHT,
DiscreteNodeLabelPositions.TOP_LEFT,
DiscreteNodeLabelPositions.BOTTOM_RIGHT,
DiscreteNodeLabelPositions.BOTTOM_LEFT
Sample Graphs
Combined position that describes the positions outside the node at each of its sides.
Static Methods
Converts the given argument to an enum constant of this enum type.
Remarks
Most notably, this method can convert an enum constant's name into the enum constant itself.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - DiscreteNodeLabelPositions
- The value to convert to an enum constant.
Returns
- ↪DiscreteNodeLabelPositions
- The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - DiscreteNodeLabelPositions
- The numeric value of an enum constant.
Returns
- ↪string
- The name of the enum constant.
Throws
- Exception({ name: 'Error' })
- If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.