score:1

Accepted answer

You can add a translate to each individual path, just translate them by a different amount of y to separate them from each other.

An example can be found at this fork of your code.

As you loop through the groups, you are already adding a path for each group. You can just add another attribute: .attr('transform', 'translate(0, ' + yTranslate + ')') and then increment yTranslate by a distance of your choice (e.g. 50) for each group.

If you prefer, you could also make the amount of y-translation a property of the group, and set it up in the group definition earlier. This would be similar to how you specify the color.


Related Query

More Query from same tag