How can I (or what tools are available) for drawing a line between two or more elements to connect them? Any combination of HTML/CSS/JavaScript/SVG/Canvas is fine.
If your answer supports any of these, then do mention it:
- draggable elements
- draggable/editable connections
- element overlap avoidance
This question has been updated to consolidate the numerous variations of it.
jsPlumb is an option available that supports drag and drop, as seen by its numerous demos, including the Flowchart demo.
It is available in a free Community edition, and a paid Toolkit edition.
JointJS/Rappid supports this use case with its Kitchensink example which supports dragging and dropping of elements, and repositioning of connections. It has many examples.
VisJS supports this with its Arrows example, that supports draggable elements.
It also supports editable connections, with its Interaction Events example.
GoJS supports this, with its State Chart example, that supports dragging and dropping of elements, and editing of connections.
mxGraph — used by draw.io — supports this use case, with its Grapheditor example. Documentation. Examples.
D3 has hundreds of examples, some of which are suitable for this question.
Examples without drag and drop, that are fixed:
Examples without drag and drop, that are interactive:
Examples with dragging and dropping: