Some predefined optimization strategies for placing labels.
Members
No filters for this type
Constants
A label position is considered to be ambiguous if it might not be possible to identify to which graph element the label belongs. For example, an edge label placed in between two edges is ambiguous.
Applying ambiguity reduction may significantly increase the running time of the labeling algorithm, especially for graphs with a large number of labels and or a high number of LabelCandidates.
static
An optimization strategy that mainly tries to satisfy the user-specified preference given by weight.
An optimization strategy that mainly tries to satisfy the user-specified preference given by weight.
Positions with a higher weight value are more likely chosen by the labeling algorithm. There are multiple ways to specify the weight values, e.g., as a parameter of a predefined candidate set (see addDiscreteCandidates) or by means of property edge label candidate processor or node label candidate processor, respectively.
static
See Also
An optimization strategy that especially reduces overlaps of labels and the LayoutGrid.
An optimization strategy that especially reduces overlaps of labels and the LayoutGrid.
This strategy tries to avoid label positions that intersect with the grid lines themselves, and to a lesser extent the padding of the grid. Placement completely outside of the grid bounds is also avoided more strictly. Note that this optimization relies on the original positions of the LayoutGridRow and LayoutGridColumn. If the labeling algorithm is used standalone and a previous layout run has modified the layout grid, the original values may be out of date and the computed values need to be written back manually.
static
See Also
An optimization strategy that mainly tries to satisfy the preferences as described by a EdgeLabelPreferredPlacement associated with edge labels.
An optimization strategy that mainly tries to satisfy the preferences as described by a EdgeLabelPreferredPlacement associated with edge labels.
Static Methods
Converts the given argument to an enum constant of this enum type.
Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static
Parameters
- value: LabelingOptimizationStrategy
- The value to convert to an enum constant.
Return Value
- LabelingOptimizationStrategy
- The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
Returns the name of the given enum constant.
static
Parameters
- value: LabelingOptimizationStrategy
- The numeric value of an enum constant.
Return Value
- 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.