Skip to main content
Version: 4.1

Link

A single line link.

SVG selectors​

Supported attrs properties:

SelectorNodeDescription
rootSVGGElementContainer of all nodes
lineSVGPathElementVisible connection of the link
wrapperSVGPathElementInvisible wrapper around the connection to make the line thicker, so the user can interact with the link more easily
const link = new shapes.standard.Link();
link.prop('source', { x: 450, y: 600 });
link.prop('target', { x: 400, y: 750 });
link.prop('vertices', [{ x: 450, y: 700 }]);
link.attr('root/title', 'shapes.standard.Link');
link.attr('line/stroke', '#fe854f');

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub