Skip to content

EdgeLabel

since v0.8.0

Interface representing a label of an edge.

id: string

The id of the label.


optional position: Point

The position of the label on flow.


positionOnEdge: EdgeLabelPosition

The position of the label on the edge.

  • Relative (number, 0-1): 0 is the source, 1 is the target, 0.5 is the midpoint.
  • Absolute ('Npx'): pixel distance from source (positive) or target (negative).
positionOnEdge: 0.5 // midpoint (relative)
positionOnEdge: '30px' // 30px from source (absolute)
positionOnEdge: '-20px' // 20px from target (absolute)

optional size: Size

The size of the label.