SankeyMATIC Manual

Syntax Reference

Manual Sections: The Basics: Nodes, Flows & Colors
Labels & Units
Exporting & Publishing
Flow Cross-Check
Syntax Reference
Scaling Diagrams for Comparison
Unusual Facts & Settings

SankeyMATIC Source Data Syntax

Defining Flows:
Source Line Format & Meaning: Example:

Source Node Name [Amount] Target Node Name

A basic Flow.

Amount flows from Source to Target, using the default Flow Color and default Flow Opacity (as specified in the “Colors” control section).

Prior Cash On Hand [72954.53] Total Funds

Shows 72,954.53 flowing:

  • FROM the Node “Prior Cash On Hand” TO the Node “Total Funds”
  • Colored using the default Flow Color and Flow Opacity

Source Node Name [Amount] Target Node Name #Color

A Flow with a custom Color.

Amount flows from Source to Target, using the specified Color and the default Flow Opacity (as specified in the “Colors” control section).

Borrowing to cover deficit [366.6] 1993 Budget #660000

Shows 366.6 flowing:

  • FROM the Node “Borrowing to cover deficit” TO the Node “1993 Budget”
  • The Flow is colored dark red (#660000)
  • Uses the default Flow Opacity

Source Node Name [Amount] Target Node Name #Color.Opacity

A Flow with a custom Color and custom Opacity.

Amount flows from Source to Target, using the specified Color and the specified Opacity.

Electricity grid [7.863] Rail transport #F90.7

Shows 7.863 flowing:

  • FROM the Node “Electricity grid” TO the Node “Rail transport”
  • The Flow is colored orange (#F90)
  • The Flow’s Opacity is .7 (near-solid).
Defining Nodes:
Source Line Format & Meaning: Example:

:Node Name #Color

Set the Color for a specific Node (referenced by Name).

:Surplus #090

The Node named “Surplus” will be colored bright green (#090).

:Node Name #Color >>

Set a Node’s Color and use the same color for all Flows FROM the Node.

:Surplus #090 >>

The Node named “Surplus” will be colored bright green (#090).

So will any Flows to the Node’s right.

:Node Name #Color <<

Set a Node’s Color and use the same color for all Flows TO the Node.

:Surplus #090 <<

The Node named “Surplus” will be colored bright green (#090).

So will any Flows to the Node’s left.

:Node Name #Color << >>

Set a Node’s Color and use the same color for all Flows TO & FROM the Node.

:Surplus #090 << >>

The Node named “Surplus” will be colored bright green (#090).

So will any Flows in either direction from the Node.

Other Line Types:
Source Line Format & Meaning: Example:

Comment line:

' any content

Annotate your source data by starting a line with a single quote mark.

Comment lines are skipped and do not affect the diagram.

(Also useful if you want to temporarily hide a source line without deleting it.)

'Source URL for this diagram's data: http://example

Blank line:

Blank lines are ignored.

Use blank lines to separate sections of your source data to make it easier to read.

         

Definitions

#Color:

HTML Color, in the form #RGB (example: #3CF) or #RRGGBB (example: #009A00)

.Opacity:

Controls an item’s transparency on a scale from 0.0 (Completely transparent) to 1.0 (Solid, opaque).

Allowable values range from .0 to .9999.

The default Flow Opacity is 0.4.

[Amount]:

An integer or decimal number greater than 0. Use no commas or unit type indicators.

Examples: [17]; [10.456]; [20397247.2].

Node Name:

A string of characters that can contain nearly anything except:

  • strings that look like an [Amount] (examples: [1234], [1.2])
  • strings that look like a #Color (examples: #5AD, #000000)

Flow Color Precedence

A Flow’s color can be set by four different methods.

There is a strict precedence to how a Flow’s color is resolved, as follows:

  1. If the Flow source line specifies a color, use that.

  2. If the Flow’s Source Node says the Flow should inherit that Node’s color, use it.

  3. If the Flow’s Target Node says the Flow should inherit that Node’s color, use it.

  4. Use the Default Flow Color as set in the “Colors” section of the controls.

    (This could automatically inherit the Source Node or Target Node’s color, or could be a specific Color entered by the user.)

Node Color Precedence

A Node’s color can be set by two different methods.

Each Node’s color is resolved as follows:

  1. If there is a Node Definition line specifying a color, use that.

  2. Use the Default Node Color as set in the “Colors” section of the controls.

    (This could be a single Color entered by the user or a color chosen by SankeyMATIC from a color Theme selected by the user.)