Skip to content

Edge Markers

Arrowheads are configured per edge: open or closed, at either end, in any colour and at any size. Edges asking for the same arrowhead share a single SVG definition, so a large graph declares one marker per style rather than one per edge.

Source
Open arrow
Closed arrow
Coloured head
Both ends
bit Blow

Try it

  • Compare the four edges: an open arrow, a closed one, a closed red head on a grey line, and a blue line with a closed head at both ends.
  • Move Size: every arrowhead grows or shrinks together, staying square.
  • Pick a Default marker colour: every head without a colour of its own takes it - the blue line's two heads included - while the red head keeps its red.
  • Click an edge: its line and every head that follows the line's colour turn the selection colour; a head with a colour of its own keeps it.
  • Drag from Source's right-hand dot to any node's left-hand dot: the new edge gets an open arrow at the current size.

How it works

  • MarkerEnd (on by default) and MarkerStart (off) draw an arrowhead at the target and source end.
  • MarkerType is BlowMarkerType.Arrow (open, the default) or ArrowClosed (filled).
  • Without a MarkerColor a head takes its edge's Stroke; MarkerColor sets one of its own, here red on a grey line.
  • DefaultMarkerColor on the canvas (null by default) colours every head that names no MarkerColor, ahead of the edge's stroke.
  • MarkerWidth defaults to 7 (8 for a closed head), and MarkerHeight follows the width when left null; the slider sets the width of every edge.
  • SVG markers have to be declared up front, so the canvas declares one <marker> for each distinct shape, colour and size in use, shared by every edge that asks for it.
An unhandled error has occurred. Reload 🗙