documentationfor yFiles for HTML 3.0.0.3

EdgeLabelPreferredPlacement

An EdgeLabelPreferredPlacement describes the preferred placement of edge labels for automatic edge labeling algorithms.

Inheritance Hierarchy
EdgeLabelPreferredPlacement

Remarks

It provides several options that influence the label placement in generic labeling algorithms and layout algorithms that support integrated label placement.

The preferred placement can describe multiple locations. For some options, like placementAlongEdge, it is possible to have a combination of the valid values. These values can be connected with a logical or-operation.

The following options describe the preferred placement:

  • the placement along the edge
  • the side of the edge
  • the reference of the side
  • the distance between the label and its edge segment
  • the rotation angle of the label
  • the reference for the rotation angle
  • the rotation behavior for labels on the right side of the edge
  • the angle offset for labels on the right side of the edge

A EdgeLabelPreferredPlacement can be set for each label using layout data properties offered on the layout data instances of the respective layout algorithm, for example, edgeLabelPreferredPlacements, edgeLabelPreferredPlacements, edgeLabelPreferredPlacements.

When working without layout data instance and with LayoutGraph directly, instances can be defined via an IMapper<K,V> registered with key EDGE_LABEL_PREFERRED_PLACEMENT_DATA_KEY.

Default Values of Properties

addHalfRotationOnRightSidefalseLabels are not rotated by an additional 180 degrees.
angle0
angleReferenceABSOLUTE
angleRotationOnRightSideCLOCKWISE
distanceToEdge-1
edgeSideON_EDGE
placementAlongEdgeAT_CENTER
sideReferenceRELATIVE_TO_EDGE_FLOW

Type Details

yFiles module
algorithms

Constructors

Properties

Methods

Static Methods