How to arrange an ER diagram left to right in Mermaid Live Editor
SceneRecap's agent performed these steps on the live product and recorded them; the steps were written by SceneRecap from that recording. Mermaid Live Editor may look different now if it has changed since.
Before you start
- Open Mermaid Live Editor in a browser, on the /edit page (2.0s).
- Have an erDiagram in the Code tab. The recording uses erDiagram, CUSTOMER ||--o{ ORDER : places and ORDER ||--|{ ITEM : contains (1.0s).
Steps
- 1
Check the preview. The diagram renders top to bottom: CUSTOMER, then ORDER, then ITEM (3.0s).
0:03 - 2
In the Code editor, add a new line directly after erDiagram and type: direction LR (11.0s).
0:09 - 3
Check the preview again. CUSTOMER, ORDER and ITEM now sit in a horizontal row, joined by 'places' and 'contains' (11.0s).
0:11
Result: The ER diagram renders left to right with the direction LR line in place (11.0s to 17.0s). In the recording, the ITEM entity is partly cut off at the right edge of the preview (17.0s).
This guide answers a question asked on github.com.
Make a step-by-step guide like this from a screen recording.
Do the task once while recording. SceneRecap writes the steps, each linked to its moment in the video. Guides are on every plan, Free included.
Make your own guide free →