Back

Diagram

A Diagram is a kind of Sketch that draws itself from text. You write a few lines of Mermaid code; Lino turns them into a clean diagram. It's the fastest way to get a flowchart that you can still change by editing words.

Example: these four lines

flowchart TD
  Light --> Chlorophyll
  Chlorophyll --> Glucose
  Water --> Glucose

draw a top-down flowchart with four boxes and three arrows.

Create a Diagram

  1. Right-click a blank spot on the Canvas → Sketch.
  2. Double-click the new Sketch and choose Diagram ("Structure from Mermaid code").
  3. Type your code in the window that opens beside it, or pick a sample.

Or ask Lino AI: "draw a flowchart of the checkout process". New Diagrams from Lino AI land in your Inbox for you to place.

Edit the code

Double-click a Diagram to open its code window beside it. The picture updates a moment after you stop typing. If the code has a mistake, the first line of the error appears under the preview (for example "Syntax error").

The code window's header has:

ButtonWhat it does
Samples / Hide samplesShows ready-made examples. Picking one replaces your code.
Wrap code / Disable wrapWraps long lines.
Copy all textCopies the code ("Copied").

While editing, the toolbar above the Diagram has Hand-drawn (draw every Diagram in a sketchy, hand-drawn style; Disable hand-drawn to go back) and Right Panel. Hand-drawn is one setting for all your Diagrams, not just this one.

In the Right Panel the code sits in a card next to the preview; drag its edge to make it wider; the Reset width button in its header puts it back.

Samples

The samples cover most of what Mermaid can draw: Basic Flowchart, Basic Sequence, Class Inheritance, Basic State, ER Schema, Pie Chart, Social Media Timeline, Basic Mindmap, Git Flow, Working Day, Internet Banking System, System Architecture, Energy Flow, Block Layout, Sales Revenue, Product Positioning, Student Grades, Treemap, Venn Diagram, Requirements, Fishbone Diagram, TCP Packet and Kanban Board. Start from the closest one and change the words.

Clear a Diagram

In the Right Panel, More sketch actions → Clear code empties it after asking "Clear this Diagram?".

Diagrams in Lino AI replies

When Lino AI answers with a diagram, it shows right in the reply with Add diagram to canvas. Once it's placed, the button reads Show in Canvas.

  • Sketch — captions, export, Sketches in Cards
  • Chart — the same idea for data