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.
We can easily convert this to two paths. One for the nodes and one for the connecting lines.
Likewise we can generate reusable components for each node. Each of these nodes is clickable.