Add links and nodes to svg groups to avoid links overlapping nodes.