Rearranged SVG-generating code to be in one place. No functional changes.
Rearranged SVG-generating code to be in one place. No functional changes.

Eventually the SVG generation ought to be refactored to be separate; this
is one step toward that.

nowthis/sankeymatic,nowthis/sankeymatic