path

Overview

The svg element below contains only a single path. This may not be ideal, depending on your needs, but it demonstrates the ability to create complex shapes in a single path.

source

We can easily convert this to two paths. One for the nodes and one for the connecting lines.

source

Likewise we can generate reusable components for each node. Each of these nodes is clickable.

source

Did we mention it works in canvas too?

source