Nodes, edges and groups

The shapes a node can take, edges and their line styles, and groups, with the editor command and the line of text for each.

A flowchart is made of three things:

  • Nodes: the steps, decisions and records, each drawn as a shape.
  • Edges: the lines between nodes.
  • Groups: boxes that hold related nodes.

Node shapes

Each node has a shape. These are the ones most diagrams use:

Six shapes, each labelled with its name: Stadium, Rectangle, Diamond, Hexagon, Cylinder and Document.

ShapeUsually meansText
StadiumA start or an endstart(["Claim received"])
RectangleA stepcheck["Check receipts"]
DiamondA decisionlimit{"Over £500?"}
HexagonA preparation stepprep{{"Prepare the batch"}}
CylinderA databaseledger[("Ledger")]
DocumentA documentpolicy["Policy"]@{ shape: doc }

The word before the brackets is the node’s id: a short name that edges use to point to the node. It doesn’t show in the diagram. The text in quotes is its label, which shows on the node.

With Line9 Pro, in the Line9 editor, type :shape and choose from every shape, with a picture of each. The editor reference lists them all.

Edges and line styles

An edge joins two nodes by their ids.

Claim submitted joins Check receipts with a solid line labelled Solid. Check receipts joins Spot-check by Audit with a dotted line labelled Dotted.

LineText
Solidclaim --> check
Dottedcheck -.-> audit
Thickclaim ==> check

To label an edge, put the label between bars:

claim -->|"Solid"| check

With Line9 Pro, in the Line9 editor, press > and move to the other node to connect two nodes, and type :line to change the line.

Groups

A group draws a box around related nodes, with a title. Use groups for teams, systems or stages.

Two groups side by side: Employee holds Submit claim and Attach receipts; Finance holds Within policy? and Pay claim.

flowchart LR
  subgraph finance["Finance"]
    policy{"Within policy?"}
    pay["Pay claim"]
  end

A group can sit inside another group. Each node belongs to one group at most.

With Line9 Pro, in the Line9 editor, select the nodes and type :group and the title of an existing group, or a new title.

Colours and the legend

To colour nodes, edges or groups by role, give them a class. Line9 picks the colours and explains them in a legend. See Colour-code with classes.

Next