SankeyMATIC Manual

Miscellaneous Features

Reversing a Diagram

There may be times when you would like to display your data from another angle.

For some kinds of diagrams, showing a flow from right-to-left may be as useful as showing left-to-right.

In the “Advanced” control panel, there is a checkbox which can make this happen without any changes to your data lines:

Checkbox labeled 'Reverse the Graph (flow right-to-left)'

Example:

Default layout:

sample-diagram

With 'Reverse the graph' checked:

sample-diagram-reversed

Note: depending on your labels' positions, your margins may have to be adjusted to fit. (The examples above are shown with all labels on the left.)

Additional Questions & Answers

Q: I would like the Flows to be arranged differently. Can anything be done about that?

A: The layout algorithm of the D3 Sankey library can depend on the order of the Nodes and Flows in some mysterious ways.

If you don't like the layout it produces, experiment with changing the order of your Nodes lines, then your Flows lines.

Beyond that, you can drag Nodes around to reposition them before you export. (However, changing any of your inputs or settings will re-draw/reset the whole diagram, so save the dragging for the last step before you export.)

A future feature I have planned will make it possible to set your Flows' order more explicitly.

Q: I can't enter negative flow amounts (or 0 for that matter)

A: It's unclear how best to draw a negative flow, so SankeyMATIC doesn't try.

What you may find useful to try instead is to try a positive flow in the opposite direction, labeled and colored to make clear that it is a different kind of value.

For example, in a budget diagram you could represent a missing amount with a line like:

Shortfall [500] Budget #990000

...which will create a red-colored flow representing the 'missing' amount and keep the overall diagram balanced.

Q: I am unable to set a Node to flow into itself or into a Node before it.

A: This is true. The D3 Sankey library version used here does not currently support those types of inputs, and therefore this tool does not either.

Q: Why does the diagram take a long time to be drawn when I make a change?

A: Your browser may be extra busy with generating a high-resolution version of your diagram.

After every change to your diagram, a PNG image file is re-created in the background using the Scale you have chosen, so working with ‘4x’ (or even ‘2x’) can be a bit slow at times.

If the speed is unsatisfactory, save the scaling-up step until you are finally ready to export. To change this setting temporarily, visit the “Export” control panel and change the Scale to ‘1x’ while you iterate on your design. Change it back to a higher resolution when you are ready to export.