mermaid.flowchart.layout

mermaid.flowchart

layout(graph, compact, turned) -> frame, err

Lay a flowchart out into a frame

graph is what parse returns. A graph may be laid out more than once: the layout reads it and writes nothing into it. With compact the diagram is laid out as tight as it reads: one blank cell where the usual layout leaves two or three, and labels wrapped at half the width.

A diagram is laid out as a flow down or to the right, and BT and RL are those two run the other way.

With turned the graph is laid out in the other flow: TD as LR, LR as TD, BT as RL and RL as BT. The frame is the one the same statements give under that other header.

Returns nil and a reason for a diagram of more than 4000 layout nodes, the dummies of its long edges counted, and for a subgraph that cannot be framed.