Skip to content

Tables, diagrams and maths

Audience: everyone who edits models · ~10 min read · Prerequisites: Notations and views

Some concepts draw their tree as a table, a diagram, typeset maths or a decision table instead of plain text. The model is the same tree either way; this page covers the controls each of those notations adds.

Tables

A state machine drawn as a table

A table notation lays one list of child nodes out as rows. Each column is one slot of the row's concept. All cells are ordinary editable cells, so typing, completion and Tab work as everywhere else.

  • If the table is filterable, a Filter… box sits under each column header. Typing in it hides rows that do not match. While a filter is active you cannot shift-click to select a range of rows.
  • If the table has a footer button, + Add row appends a new empty row. Without that button you add rows with Enter inside a cell, as in the text notation.
  • A × button on a row (tooltip Delete row) removes it.

Diagrams

The same state machine as a diagram, with the diagram toolbar

A diagram draws a list of nodes as boxes and the references between them as arrows. Small diagrams fit the editor. Diagrams bigger than about 830 by 545 pixels switch to a pannable, zoomable canvas with a minimap.

Mouse and keyboard on the canvas:

Action What it does
Click a box Selects it
Drag a box Moves it. The position is saved in the model if the concept has x and y slots; otherwise the diagram lays itself out
Drag the background Pans a large diagram
Shift+drag the background Draws a selection rectangle around several boxes
Delete or Backspace Deletes the selected box or boxes
Arrow keys Pan a large diagram (not while you are typing in a box's label)
Ctrl+K / Cmd+K Opens the diagram's own action list, with a search box
A language's shortcut key (for example N for Add step in the Flow diagram) Runs that action while the diagram has the focus
Esc Closes the open menu (the right-click menu, ⋯, Layout or Change Shape), leaves fullscreen, or clears a multi-selection. Pressing anywhere outside an open menu closes it too
Right-click a box Add Step After, Move Left/Right/Up/Down, Shape: ... (Rectangle, Ellipse, Diamond or Hexagon: every shape the box does not have now), Delete. Edit Label and Connect to… are on the bar above the selected box.

The header above the diagram has two zones. On the left, in a tinted zone named after the language element (for example FlowDiagram), are the buttons that language adds for its own diagrams, such as Add step. On the right are the controls every diagram has. Tooltips show the names, and the header fades while the pointer is elsewhere. The Tab key stops once on the header, the arrow keys move between its buttons, and Esc returns to the diagram.

Control What it does
− / percentage / + Zoom out, reset zoom (the percentage is the current zoom; on a large diagram it is "Reset pan/zoom (fit to screen)"), zoom in
Layout, and the arrow beside it Arranges the boxes automatically. The arrow opens the direction (top to bottom or left to right) and the engine (built-in or ELK). The choice is used by the next Layout
Fullscreen Fills the editor area. The header becomes a column of buttons on the left, and the step numbers appear on the boxes, because the line numbers are covered. Exit with Esc
⋯ Opens all actions, grouped, with a search box (also Ctrl+K). Press P on an action, or click its pin, to put it on the header. Pins are remembered for all diagrams

The ⋯ list holds the rest: Open in New Window (on the same model even if you have opened another project since), Right-Angle Edges (switches the arrows between right-angled and straight routing, not saved), Span Full Editor Width (lets a tall diagram grow to the width of the editor instead of shrinking to fit its height; remembered for all diagrams), Export SVG, Collapse All Groups and Expand All Groups, and the actions for the selected box. A toggle shows a check mark, and the same button on the header shows as pressed. In a read-only model the actions that change the model are left out.

A language can also mark its own actions as secondary. Those are only in the ⋯ list, under the language's heading, until you pin them.

Where a step can go is drawn on the canvas, for languages that can add a step (the Flow diagram can):

  • A dashed + Add step under the last step adds a step at the end of the flow.
  • Hover an arrow and a dashed + appears on it. It puts a new step between the two steps the arrow joined.
  • Select a box and a + appears beside it. It adds a step after that box and draws the arrow.

A small bar appears above the selected box with Edit Label, Change Shape (a list of the four shapes with the current one checked, each with a line on what the shape means: a task, a start or an end, a decision, a split or a join), Connect to… (then click the box to connect to, or press [ / ] and Enter; clicking the same box or the empty canvas cancels), Add Step After and Delete Step. It is a toolbar of its own: Tab reaches it and the arrow keys move along it.

A box can have one of four shapes. Pick it with Change Shape on the bar above the selected box, Shape: ... from the right-click menu, or the ⋯ list.

Shape Use it for
Rectangle A task. This is the default
Ellipse A start or an end
Diamond A decision. Give each arrow leaving it a label, such as edge(approved, "yes")
Hexagon A parallel split (several paths leave it at once) or a join (all of them must arrive before it goes on)

In a diagram that has a diamond, every box is a little taller so the labels fit.

Maths notation

Formulas drawn as 2D maths

The Math Notation (2D formula demo) sample shows expressions the way a textbook draws them: a fraction has the numerator over the denominator, a sum has its limits above and below, a matrix is a grid. The editor uses the browser's MathML engine for this. You still edit with the keyboard: Tab and the arrow keys move between the parts of a formula, and typing fills cells as usual. Parentheses grow to the height of what they contain.

Decision tables

A first-match decision table

A decision table is a table of conditions and results that stands where an expression would. The editor reads the rows from top to bottom and uses the result of the first row whose condition is true. If no row matches, the otherwise row is used. Consecutive rows with the same literal result are merged into one tall cell. A row group nests more rows under one shared condition. See the Decision table sample for four worked tables (grades, tax brackets, shipping, HTTP status).