Merlive

The library / Every kind of diagram

Every kind of diagram, drawn twice

One sample of each of the 32 kinds Mermaid documents beside flowcharts: both drawings where Merlive draws the kind, and Mermaid’s alone where it is left.

32 samples: 12 drawn as written, 20 left as Mermaid. Mermaid’s side is mermaid-cli 12.2.0 as it comes, on white. Merlive’s is 0.6.1 in its own look.

Sequence diagram

Drawn

Mermaid
Sequence diagram, as Mermaid draws it
Merlive
Sequence diagram, as Merlive draws it
The Mermaid
sequenceDiagram
  participant B as Buyer
  participant E as ERP
  participant S as Supplier
  B->>E: Raise order
  E->>S: Send order
  S-->>E: Confirm
  E-->>B: Order confirmed
Draw it yourself

ZenUML sequence diagram

Left as Mermaid

Mermaid
ZenUML sequence diagram, as Mermaid draws it
Merlive

Left as Mermaid: a zenuml is not drawn yet.

The Mermaid
zenuml
  title Order
  Buyer->ERP: Raise order
  ERP->Supplier: Send order
  Supplier->ERP: Confirm
Draw it yourself

Class diagram

Drawn

Mermaid
Class diagram, as Mermaid draws it
Merlive
Class diagram, as Merlive draws it
The Mermaid
classDiagram
  class Order {
    +String number
    +Date placed
    +total() Money
  }
  class OrderLine {
    +int quantity
    +Money price
  }
  Order "1" *-- "many" OrderLine
  Order --> Supplier
Draw it yourself

State diagram

Drawn

Mermaid
State diagram, as Mermaid draws it
Merlive
State diagram, as Merlive draws it
The Mermaid
stateDiagram-v2
  [*] --> Draft
  Draft --> Submitted: submit
  Submitted --> Approved: approve
  Submitted --> Draft: send back
  Approved --> [*]
Draw it yourself

Requirement diagram

Drawn

Mermaid
Requirement diagram, as Mermaid draws it
Merlive
Requirement diagram, as Merlive draws it
The Mermaid
requirementDiagram

  requirement approval {
    id: 1
    text: Orders over the limit are approved by a manager.
    risk: high
    verifymethod: test
  }

  element approval_flow {
    type: workflow
  }

  approval_flow - satisfies -> approval
Draw it yourself

C4 diagram

Drawn

Mermaid
C4 diagram, as Mermaid draws it
Merlive
C4 diagram, as Merlive draws it
The Mermaid
C4Context
  title Ordering, in context
  Person(buyer, "Buyer", "Raises purchase orders")
  System(erp, "ERP", "Holds orders and stock")
  System_Ext(sup, "Supplier portal", "Takes orders")
  Rel(buyer, erp, "Raises orders in")
  Rel(erp, sup, "Sends orders to")
Draw it yourself

Block diagram

Drawn

Mermaid
Block diagram, as Mermaid draws it
Merlive
Block diagram, as Merlive draws it
The Mermaid
block
  columns 3
  web["Web shop"] erp["ERP"] wh["Warehouse"]
  web --> erp
  erp --> wh
Draw it yourself

Architecture diagram

Drawn

Mermaid
Architecture diagram, as Mermaid draws it
Merlive
Architecture diagram, as Merlive draws it
The Mermaid
architecture-beta
  group cloud(cloud)[Azure]

  service api(server)[Orders API] in cloud
  service db(database)[Orders] in cloud
  service queue(disk)[Queue] in cloud

  api:R -- L:db
  api:B -- T:queue
Draw it yourself

Swimlane diagram

Left as Mermaid

Mermaid
Swimlane diagram, as Mermaid draws it
Merlive

Left as Mermaid: a swimlane-beta is not drawn yet.

The Mermaid
swimlane-beta LR
  subgraph Buyer
    Raise[Raise order]
  end
  subgraph Manager
    Approve[Approve]
  end
  subgraph Supplier
    Confirm[Confirm]
  end
  Raise --> Approve --> Confirm
Draw it yourself

Use case diagram

Left as Mermaid

Mermaid
Use case diagram, as Mermaid draws it
Merlive

Left as Mermaid: a usecase-beta is not drawn yet.

The Mermaid
usecase-beta
  direction LR
  actor Buyer("Buyer")
  systemBoundary "Ordering"
    Raise("Raise an order")
  end
  Buyer --> Raise
Draw it yourself

Agent flow

Left as Mermaid

Mermaid
Agent flow, as Mermaid draws it
Merlive

Left as Mermaid: a agentflow-beta is not drawn yet.

The Mermaid
agentflow-beta TB
  flow buyer["Order agent"]
    read["Read the request"]@{ shape: input }
    check["check_stock"]@{ shape: tool }
    ok["In stock?"]@{ shape: decision }

    read --> check --> ok
  end
Draw it yourself

Event model

Left as Mermaid

Mermaid
Event model, as Mermaid draws it
Merlive

Left as Mermaid: a eventmodeling is not drawn yet.

The Mermaid
eventmodeling

tf 01 ui OrderForm
tf 02 cmd PlaceOrder
tf 03 evt OrderPlaced
Draw it yourself

User journey

Left as Mermaid

Mermaid
User journey, as Mermaid draws it
Merlive

Left as Mermaid: a journey is not drawn yet.

The Mermaid
journey
  title Raising an order
  section Ask
    Find the supplier: 3: Buyer
    Fill in the order: 2: Buyer
  section Wait
    Get approval: 4: Buyer, Manager
Draw it yourself

Timeline

Drawn

Mermaid
Timeline, as Mermaid draws it
Merlive
Timeline, as Merlive draws it
The Mermaid
timeline
  title The order's week
  Monday : Raised
  Tuesday : Approved : Sent
  Friday : Delivered
Draw it yourself

Gantt chart

Left as Mermaid

Mermaid
Gantt chart, as Mermaid draws it
Merlive

Left as Mermaid: a gantt is not drawn yet.

The Mermaid
gantt
  title Rolling out the ERP
  dateFormat YYYY-MM-DD
  section Europe
    UK        :a1, 2027-01-04, 30d
    Germany   :after a1, 20d
  section Elsewhere
    South Africa :2027-02-15, 25d
Draw it yourself

Git graph

Left as Mermaid

Mermaid
Git graph, as Mermaid draws it
Merlive

Left as Mermaid: a gitGraph is not drawn yet.

The Mermaid
gitGraph
  commit
  branch feature
  checkout feature
  commit
  commit
  checkout main
  merge feature
  commit
Draw it yourself

Mindmap

Drawn

Mermaid
Mindmap, as Mermaid draws it
Merlive
Mindmap, as Merlive draws it
The Mermaid
mindmap
  root((Ordering))
    Buying
      Quotes
      Orders
    Paying
      Invoices
      Payments
Draw it yourself

Tree view

Left as Mermaid

Mermaid
Tree view, as Mermaid draws it
Merlive

Left as Mermaid: a treeView-beta is not drawn yet.

The Mermaid
treeView-beta
├── orders/
│   ├── open.csv
│   └── closed.csv
├── suppliers.csv
└── README.md
Draw it yourself

Ishikawa (fishbone) diagram

Left as Mermaid

Mermaid
Ishikawa (fishbone) diagram, as Mermaid draws it
Merlive

Left as Mermaid: a ishikawa-beta is not drawn yet.

The Mermaid
ishikawa-beta
    Late delivery
    Supplier
        Out of stock
        Wrong address
    Warehouse
        Short staffed
    Carrier
        Missed pick-up
Draw it yourself

Kanban board

Drawn

Mermaid
Kanban board, as Mermaid draws it
Merlive
Kanban board, as Merlive draws it
The Mermaid
kanban
  todo[To do]
    t1[Raise the order]
  doing[Doing]
    t2[Chase the supplier]
  done[Done]
    t3[Pay the invoice]
Draw it yourself

Treemap

Left as Mermaid

Mermaid
Treemap, as Mermaid draws it
Merlive

Left as Mermaid: a treemap-beta is not drawn yet.

The Mermaid
treemap-beta
"Europe"
    "UK": 40
    "Germany": 25
"Africa"
    "South Africa": 20
Draw it yourself

Pie chart

Left as Mermaid

Mermaid
Pie chart, as Mermaid draws it
Merlive

Left as Mermaid: a pie is not drawn yet.

The Mermaid
pie title Orders by region
  "UK" : 46
  "EU" : 31
  "USA" : 15
  "South Africa" : 8
Draw it yourself

Quadrant chart

Left as Mermaid

Mermaid
Quadrant chart, as Mermaid draws it
Merlive

Left as Mermaid: a quadrantChart is not drawn yet.

The Mermaid
quadrantChart
  title Suppliers by price and speed
  x-axis Slow --> Fast
  y-axis Dear --> Cheap
  quadrant-1 Keep
  quadrant-2 Speed up
  quadrant-3 Replace
  quadrant-4 Negotiate
  Acme: [0.8, 0.7]
  Bolt: [0.3, 0.6]
  Cord: [0.6, 0.2]
Draw it yourself

XY chart

Left as Mermaid

Mermaid
XY chart, as Mermaid draws it
Merlive

Left as Mermaid: a xychart is not drawn yet.

The Mermaid
xychart
  title "Orders a month"
  x-axis [jan, feb, mar, apr, may, jun]
  y-axis "Orders" 0 --> 500
  bar [220, 260, 310, 290, 380, 430]
  line [220, 260, 310, 290, 380, 430]
Draw it yourself

Sankey diagram

Left as Mermaid

Mermaid
Sankey diagram, as Mermaid draws it
Merlive

Left as Mermaid: a sankey is not drawn yet.

The Mermaid
sankey

Orders,Approved,80
Orders,Sent back,20
Approved,Delivered,74
Approved,Cancelled,6
Draw it yourself

Radar chart

Left as Mermaid

Mermaid
Radar chart, as Mermaid draws it
Merlive

Left as Mermaid: a radar-beta is not drawn yet.

The Mermaid
radar-beta
  axis p["Price"], s["Speed"], q["Quality"], r["Range"]
  curve a["Acme"]{70, 90, 80, 60}
  curve b["Bolt"]{90, 50, 70, 80}

  max 100
  min 0
Draw it yourself

Venn diagram

Left as Mermaid

Mermaid
Venn diagram, as Mermaid draws it
Merlive

Left as Mermaid: a venn-beta is not drawn yet.

The Mermaid
venn-beta
  title A supplier worth keeping
  set Cheap
  set Fast
  set Good
  union Cheap,Fast["Risky"]
  union Fast,Good["Dear"]
  union Cheap,Fast,Good["Keep"]
Draw it yourself

Cynefin framework

Left as Mermaid

Mermaid
Cynefin framework, as Mermaid draws it
Merlive

Left as Mermaid: a cynefin-beta is not drawn yet.

The Mermaid
cynefin-beta
  title A late order

  complex
    "Find out why it keeps happening"

  complicated
    "Ask the carrier's planner"

  clear
    "Send it again"
Draw it yourself

Wardley map

Left as Mermaid

Mermaid
Wardley map, as Mermaid draws it
Merlive

Left as Mermaid: a wardley-beta is not drawn yet.

The Mermaid
wardley-beta
title Ordering

anchor Buyer [0.95, 0.63]
component Order [0.79, 0.61]
component ERP [0.52, 0.80]
component Hosting [0.10, 0.90]

Buyer -> Order
Order -> ERP
ERP -> Hosting
Draw it yourself

Railroad (syntax) diagram

Left as Mermaid

Mermaid
Railroad (syntax) diagram, as Mermaid draws it
Merlive

Left as Mermaid: a railroad-ebnf-beta is not drawn yet.

The Mermaid
railroad-ebnf-beta
title "Order number"

ordernumber = "PO-" digit digit digit digit ;
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
Draw it yourself