SankeyMATIC Manual

Topic Index

Syntax Reference

Term Definitions

Terms Examples

NodeName

A string of characters naming a unique Node. It can contain nearly anything, including emoji, with the exception of strings that look like an [Amount] or a #Color (see below).

Budget

2023/06 Amount

️🎉 Profit 🎉

[Amount]

An integer or decimal number greater than 0.

Use no commas or unit type indicators.

[17]

[209247.2712]

#Color

An HTML Color, in the form #rgb or #rrggbb (case insensitive).

For the specific precedence rules which will determine the color of each Flow and Node, see the Colors manual page.

#3cf

#009A00

.Opacity

A decimal suffix for a Color which controls the color's opacity.

Allowable values range from .0 (transparent) to .9999 (solid/opaque).

The default Flow Opacity is 0.45.

#3cf.3

#009A00.85

SankeyMATIC Input Line Types

Comments: // any content

  • Annotate your source data by starting a line with two slashes.
  • Comment lines are skipped and do not affect the diagram.
  • (Comments are also useful if you want to temporarily hide or disable a source line without deleting it.)

Example: // Source URL for this data: http://example.com/

Blanks:          

  • Blank lines are ignored. You can use them to separate sections of your source data, to make it easier to read.

Flows:

In each Flow line, Amount flows from the SourceNodeName to the TargetNodeName.

SourceNodeName [Amount] TargetNodeName = A basic Flow, using the default Flow Color & Opacity

SourceNodeName [Amount] TargetNodeName #Color = A Flow with a custom Color, using the default Flow Opacity

SourceNodeName [Amount] TargetNodeName #Color.Opacity = A Flow with a custom Color & Opacity

Examples:

Prior Cash On Hand [72954.53] Total Funds

  • This line means that 72,954.53 is flowing FROM “Prior Cash On Hand” TO “Total Funds”.
  • The default Flow Color and default Flow Opacity will be used.

Deficit Borrowing [366.6] 1993 Budget #990000

  • Indicates that 366.6 is flowing FROM “Borrowing to cover deficit” TO “1993 Budget
  • The Flow is colored dark red (#990000)
  • Uses the default Flow Opacity

Electricity grid [7.863] Rail transport #F90.7

  • Shows 7.863 flowing FROM “Electricity grid” TO “Rail transport
  • The Flow is colored orange (#F90)
  • The Flow’s Opacity is 0.7 (near-solid).

Nodes:

Node lines are optional. At this time they are only used to declare a custom color for a Node and (optionally) to paint the flows in or out of the Node with that color.

:NodeName #Color

Sets a custom Color for NodeName

:NodeName #Color >>

Paints all Flows FROM this Node with the same color

:NodeName #Color <<

Paints all Flows TO this Node with the same color

:NodeName #Color << >>

Paints all Flows TO and FROM this Node with the same color

Examples:

:Surplus Energy #090

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

:Surplus Energy #090 >>

  • Any Flows FROM “Surplus Energy” will also be colored bright green, using the default Flow Opacity.

Topic Index