documentationfor yFiles for HTML 3.0.0.3

LabelingCosts

Provides costs that influence the GenericLabeling algorithm during the ranking of different label positions.

Inheritance Hierarchy
LabelingCosts

Remarks

The GenericLabeling algorithm chooses from a set of valid label positions (specified by EdgeLabelCandidates and NodeLabelCandidates, respectively). The LabelingCosts allow specifying preferences on the costs for different types of positions. For example, whether a position where a label crosses an edge should have a high cost and, thus, is less likely chosen by the algorithm (see edgeOverlapCost).

Besides specifying custom LabelingCosts, this class contains several predefined cost configurations that realize different optimization strategies.

Default Values of Properties

ambiguousPlacementCost0.0
customPreferenceViolationCost1.0
edgeOverlapCost1.0
labelOverlapCost1.0
layoutGridViolationCost1.0
nodeOverlapCost1.0
preferredPlacementViolationCost1.0

Type Details

yFiles module
algorithms

See Also

Constructors

Properties