The Flowgrammer sample demonstrates how one can build a flowchart with a constrained syntax. You can drag and drop Nodes onto Links and Nodes in the diagram in order to splice them into the graph. There is visual feedback during the dragging process. Nodes dropped onto the diagram's background are automatically deleted. Edit text by clicking on the text of selected nodes. Deleting an action or step Node excises it from the chain of steps that it is in. The "For", "While", and "If" are not deletable, but you can select and delete the Group holding the whole body of the loop or conditional. The "Start" and "End" nodes and Links are not deletable.

The automatic layout of the diagram is accomplished with the ParallelLayout extension.

{ "class": "GraphLinksModel", "nodeDataArray": [ {"key":1, "text":"S", "category":"Start"}, {"key":-1, "isGroup":true, "cat":"For"}, {"key":2, "text":"For Each", "category":"For", "group":-1}, {"key":3, "text":"Action 1", "group":-1}, {"key":-2, "isGroup":true, "cat":"If", "group":-1}, {"key":4, "text":"If", "category":"If", "group":-2}, {"key":5, "text":"Action 2", "group":-2}, {"key":6, "text":"Action 3", "group":-2}, {"key":-3, "isGroup":true, "cat":"For", "group":-2}, {"key":7, "text":"For Each\n(nested)", "category":"For", "group":-3}, {"key":8, "text":"Action 4", "group":-3}, {"key":9, "text":"", "category":"EndFor", "group":-3}, {"key":10, "text":"", "category":"EndIf", "group":-2}, {"key":11, "text":"Action 5", "group":-1}, {"key":12, "text":"", "category":"EndFor", "group":-1}, {"key":13, "text":"E", "category":"End"} ], "linkDataArray": [ {"from":1, "to":2}, {"from":2, "to":3}, {"from":3, "to":4}, {"from":4, "to":5, "text":"true"}, {"from":4, "to":6, "text":"false"}, {"from":6, "to":7}, {"from":7, "to":8}, {"from":8, "to":9}, {"from":5, "to":10}, {"from":9, "to":10}, {"from":9, "to":7}, {"from":10, "to":11}, {"from":11, "to":12}, {"from":12, "to":2}, {"from":12, "to":13} ]}