This illustrates how one can define custom strokes for Links (or really any Shape that is relatively straight) by making use of the Shape.pathPattern property to repeatedly draw a small Shape along the stroke path. These examples may be useful in generating diagrams showing social or emotional relationships or other cases where it is useful to distinguish kinds of relationships in more manners than just by the Shape.stroke (color) or Shape.strokeWidth or Shape.strokeDashArray.

The first set of link triplets, at the top, demonstrate the basic pathPatterns defined by the definePathPattern function in this page. The last set of link doublets, at the bottom, demonstrate how those basic pathPatterns can be combined in a single Link that has two Shapes that have GraphObject.isPanelMain set to true, so that both shapes get the same Geometry computed by the link. Yet each such link shape draws a different path pattern.