Skip to content

Drawing examples

The assistant turns plain descriptions into diagrams. Each example below shows the kind of prompt that works, the diagram it produces, and the code behind it.

Diagrams are drawn with Mermaid. D2, Graphviz and PlantUML are used when you ask for them by name.

Flowchart

what does a typical expense approval process look like

Show the diagram code
flowchart LR
    A[Spend] --> B[Submit Report]
    B --> C{Manager Review}
    C -- Rejected --> B
    C -- Approved --> D{Finance Audit}
    D -- Rejected --> B
    D -- Approved --> E[Payment]

Sequence diagram

show how login works

Show the diagram code
sequenceDiagram
    participant User as User/Browser
    participant Server as Auth Server
    participant DB as Database

    User->>Server: Submit credentials (email, password)
    Server->>DB: Query user by email
    DB-->>Server: Return stored hashed password & salt
    Server->>Server: Hash input password & compare with stored hash
    
    alt Credentials Match
        Server->>Server: Generate Session ID / JWT
        Server->>DB: Store session (if not stateless)
        Server-->>User: Return Success + Set-Cookie: session_id
    else Credentials Fail
        Server-->>User: Return 401 Unauthorized (Error message)
    end

    Note over User, Server: Subsequent Requests
    User->>Server: Request Page + Session Cookie
    Server->>DB: Validate Session ID
    DB-->>Server: Session is valid
    Server-->>User: Return Protected Content

Venn diagram

show the overlap between cats and dogs as pet owners

Show the diagram code
venn-beta
set Cats["Cat Owners"]
set Dogs["Dog Owners"]
union Cats,Dogs["Both"]

XY chart (bar and line)

chart our monthly sign-ups: Jan 120, Feb 150, Mar 90, Apr 200, May 240

Show the diagram code
xychart-beta
    x-axis ["Jan", "Feb", "Mar", "Apr", "May"]
    y-axis "Sign-ups" 0 --> 250
    bar [120, 150, 90, 200, 240]

Fishbone (Ishikawa)

why are our deliveries late? I think it is a mix of people (short staffed, new drivers), routes (traffic, bad maps), vehicles (breakdowns, old vans) and warehouse (slow packing, stock errors)

Show the diagram code
ishikawa-beta
Late Deliveries
People
  Short staffed
  New driver learning curve
  Lack of training
Routes
  Peak hour traffic
  Inaccurate mapping software
  Inefficient route sequencing
Vehicles
  Aging fleet
  Maintenance backlog
  Frequent breakdowns
Warehouse
  Packing bottlenecks
  Inventory errors
  Slow order picking

Mind map

brainstorm ideas for a company retreat as a mind map

Show the diagram code
mindmap
  root((Company Retreat))
    Location
      Urban
        City Center Hotel
        Workshop Studio
      Nature
        Mountain Lodge
        Beach Resort
        Countryside Estate
      Remote
        Off-grid Cabin
        Island Getaway
    Activities
      Team Bonding
        Escape Rooms
        Cooking Class
        Sports Tournament
      Wellness
        Yoga Retreat
        Guided Hiking
        Meditation Session
      Skill Building
        Guest Speaker
        Innovation Hackathon
        Cross-department Swap
    Goals
      Strategic
        Annual Planning
        Vision Casting
        Product Roadmap
      Cultural
        Celebrating Wins
        Core Value Alignment
        New Hire Integration
      Recharge
        Mental Health Break
        Socializing
        Reducing Burnout
    Logistics
      Budget
        Low Cost - Local
        Mid Range - Regional
        High End - International
      Duration
        Day Trip
        Weekend
        Full Week
      Transportation
        Company Shuttle
        Flight + Hotel
        Self-Drive

Timeline

give me a timeline of the main milestones of the space race, from Sputnik to the Moon landing

Show the diagram code
timeline
    1957 : Sputnik 1 : USSR launches first artificial satellite
    1958 : NASA Formed : USA establishes space agency
    1961 : First Human in Space : Yuri Gagarin (USSR) orbits Earth
    1961 : Freedom 7 : Alan Shepard (USA) first American in space
    1962 : Friendship 7 : John Glenn (USA) orbits Earth
    1963 : First Woman in Space : Valentina Tereshkova (USSR)
    1965 : First Spacewalk : Alexei Leonov (USSR)
    1968 : Apollo 8 : USA first crewed flight to orbit the Moon
    1969 : Apollo 11 : Neil Armstrong and Buzz Aldrin walk on Moon

Want to try it? Open the chat and describe the diagram you need.