Docs / Fix it
Layout problems
What each problem message means, and how to fix it.
Run open-diagram check FILE (works for .json, .mmd and .py) or run the script; save() writes the files, prints a summary, then raises LayoutError listing every problem. Fix them all and run again until it says 0 layout problem(s).
| Message contains | Fix |
|---|---|
overlap or px apart | Move one block, raise gap or row_gap, or place it with right_of() / below() |
crosses | Route the line through a lane (lane, via_y or via_x), change start and end sides, or move a block. Use cross_ok only when the line should pass behind |
label ... sits on | Shorten the label, or widen the gap between the two columns |
facing away | Use start="auto", end="auto", choose other sides, or route the line through a lane |
sits on the title of group | Give the line a different start or end side, route it through a lane, or move the group's blocks |
group ... overlaps | Add the block to the group, or move it out of the group's area |
graph: the label ... touches | Spread the nodes in at, or shorten the label |
graph: the line ... runs through | Move a node so the straight line between the pair is clear |
needs N px | Give the block more width, or shorten the words |
smallest text | Do not shrink text below the theme minimum; shorten the words instead |
JSON and Mermaid mistakes name their place (columns[1][0].tiles[2], line 7); fix that spot.