EdgeLabel
since v0.8.0Interface representing a label of an edge.
Properties
Section titled “Properties”id:
string
The id of the label.
position?
Section titled “position?”
optionalposition:Point
The position of the label on flow.
positionOnEdge
Section titled “positionOnEdge”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).
Example
Section titled “Example”positionOnEdge: 0.5 // midpoint (relative)positionOnEdge: '30px' // 30px from source (absolute)positionOnEdge: '-20px' // 20px from target (absolute)
optionalsize:Size
The size of the label.