documentationfor yFiles for HTML 2.6

ArrowEdgeStyle

Edge style that renders like different single-segment arrow shapes with configurable arrow tip angle and arrow shaft thickness.

Inheritance Hierarchy
ArrowEdgeStyle
Implemented Interfaces

Remarks

The visualization is similar to ArrowNodeStyle.

The arrow will be rendered between the two intersection points with the node shapes, as if a line were drawn directly between the two ports.

The thickness property determines the size of the arrow.

The other settings are the same as for ArrowNodeStyle.

The final shape is defined by:

  • shape – The basic shape of the arrow, e.g. ARROW or NOTCHED_ARROW.
  • angle – The tip angle.
  • thickness – The thickness of the shape at its widest point.
  • shaftRatio – The thickness of the shaft relative to thickness.
  • sourceCropping – The amount of space to crop from the imaginary line between the source node intersection point. This shortens the arrow and leaves room at the arrow's end.
  • targetCropping – The amount of space to crop from the imaginary line between the target node intersection point. This shortens the arrow and leaves room at the end of the arrow's tip.

Examples

The following example shows a simple ArrowEdgeStyle.

graph.createEdge(
  source,
  target,
  new ArrowEdgeStyle({
    shape: 'arrow',
    thickness: 10,
    sourceCropping: 5,
    targetCropping: 1,
    fill: 'white',
    stroke: 'dark-blue'
  })
)

The following example shows a ArrowEdgeStyle with a thick notched shaft and a short head

graph.createEdge(
  source,
  target,
  new ArrowEdgeStyle({
    shape: 'notched-arrow',
    angle: Math.PI / 8,
    thickness: 10,
    shaftRatio: 1,
    sourceCropping: 10,
    targetCropping: 10,
    fill: 'black',
    stroke: null
  })
)

Type Details

yfiles module
styles-other
yfiles-umd modules
All view modules
Legacy UMD name
yfiles.styles.ArrowEdgeStyle

See Also

Constructors

Properties

Methods