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.
Flowchart
Map a CI/CD pipeline from commit to production, color-coded by stage, with validation, build/test, deploy, and rollback paths.
Rendering diagram...
Show the diagram code
%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#eaf4ee", "primaryBorderColor": "#1f6f43", "primaryTextColor": "#0f3d26", "lineColor": "#5a7d6c", "clusterBkg": "#dff0e8", "clusterBorder": "#1f6f43", "edgeLabelBackground": "#ffffff"}, "flowchart": {"nodeSpacing": 50, "rankSpacing": 65, "curve": "basis"}}}%%
flowchart TD
subgraph Source ["Source Control"]
A[Developer Workstation]
B([Git Repository])
C{{Webhook Trigger}}
end
subgraph Validate ["Validation Stage"]
D[Lint Check]
E[Security Scan]
F{All Checks Pass?}
end
subgraph Build ["Build and Test"]
G[Unit Tests]
H[Integration Tests]
I[[Test Results Store]]
J[Build Artifacts]
K([Artifact Registry])
end
subgraph Deploy ["Deployment"]
L[Deploy to Staging]
M{Health Check}
N[Run Smoke Tests]
O{Smoke Tests Pass?}
P[Deploy to Production]
Q[[Production Store]]
R([CDN Cache Purge])
end
subgraph Errors ["Error Handling"]
S[Rollback]
T[Notify Developer]
U[[Send Alert Email]]
end
A --> B
B --> C
C -->|trigger| D
D --> E
E --> F
F -->|yes| G
F -.->|no| S
G --> H
H --> I
H --> J
J --> K
K --> L
L --> M
M -->|healthy| N
M -.->|unhealthy| S
N --> O
O -->|pass| P
O -.->|fail| S
P --> Q
P --> R
S --> T
T --> U
classDef green fill:#e7f3ec,stroke:#1f6f43,stroke-width:2px,color:#0f3d26
classDef red fill:#fde2e1,stroke:#b42318,stroke-width:2px,color:#7a271a
classDef blue fill:#e8f4f8,stroke:#2980b9,stroke-width:2px,color:#1a5276
classDef amber fill:#fff8e1,stroke:#f57c00,stroke-width:2px,color:#4e2600
classDef dark fill:#2d4a3e,stroke:#0f3d26,stroke-width:2px,color:#ffffff
classDef teal fill:#e0f7fa,stroke:#00838f,stroke-width:2px,color:#004d5b
classDef purple fill:#f3e8ff,stroke:#7c3aed,stroke-width:2px,color:#4c1d95
class A,B,D,E,G,H,J,K green
class S,T,U red
class I,Q blue
class F,M,O amber
class P dark
class L,N,R teal
class C purple
linkStyle 6 stroke:#b42318,stroke-width:2px
linkStyle 14 stroke:#b42318,stroke-width:2px
linkStyle 18 stroke:#b42318,stroke-width:2px
linkStyle 5 stroke:#1f6f43,stroke-width:3px
linkStyle 2 stroke:#7c3aed,stroke-width:2pxSequence diagram
Show a mobile checkout across client, API gateway, and backend services, with auth, a retry loop, and parallel fan-out.
Rendering diagram...
Show the diagram code
%%{init: {"theme": "base", "themeVariables": {"noteBkgColor": "#fff3cd", "noteTextColor": "#5a4000", "primaryColor": "#e8f5e9", "primaryBorderColor": "#2e7d32"}, "sequence": {"mirrorActors": false}}}%%
sequenceDiagram
autonumber
box rgb(220,237,200) Client
actor U as User
participant App as Mobile App
end
box rgb(187,222,251) Gateway
participant GW as API Gateway
participant Cache as Cache Layer
participant Auth as Auth Service
end
box rgb(243,229,245) Services
participant Orders as Order Service
participant Inventory as Inventory Service
participant Notify as Notify Service
end
U->>App: Tap checkout
App->>GW: POST /checkout
opt check cache first
GW->>+Cache: GET cart session
Cache-->>-GW: 200 cached cart data
end
GW->>+Auth: Validate JWT token
Note over GW,Auth: RS256 signed JWT
alt token valid
Auth-->>GW: 200 claims and user_id
else token expired
Auth-->>GW: 401 Unauthorized
GW-->>App: 401 session expired
App->>U: Redirect to login
end
Auth-->>-GW: auth complete
loop retry up to 3 times on 503
GW->>+Inventory: GET /inventory/check
Inventory-->>-GW: 200 stock confirmed
end
par fan-out to backend services
GW->>+Orders: POST /orders
and
GW->>+Notify: POST /notify/pending
end
Orders-->>-GW: 201 order_id
Notify-->>-GW: 202 queued
Note over Orders,Notify: async processing
Note over GW: aggregate responses
GW-->>App: 201 Created order_id
App->>U: Show order confirmationState diagram
Diagram an order lifecycle with validation, concurrent fulfillment and billing, a shipping choice, and cancellation.
Rendering diagram...
Show the diagram code
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#eff6ff', 'primaryBorderColor': '#3b82f6', 'primaryTextColor': '#1e3a8a', 'lineColor': '#475569', 'noteBkgColor': '#fef3c7', 'noteTextColor': '#78350f'}}}%%
stateDiagram-v2
direction LR
[*] --> OrderReceived : customer submits
OrderReceived --> Validation : process order
state Validation {
[*] --> AddressCheck
AddressCheck --> PaymentVerify
PaymentVerify --> FraudCheck
FraudCheck --> [*]
}
note right of Validation : address fraud and payment checks
Validation --> ValidationGate
state ValidationGate <<choice>>
ValidationGate --> Cancelled : order invalid
ValidationGate --> ProcessingFork : order valid
Cancelled --> [*] : order cancelled
state ProcessingFork <<fork>>
ProcessingFork --> Warehouse
ProcessingFork --> Billing
state Warehouse {
[*] --> InventoryCheck
InventoryCheck --> Picking
Picking --> Packing
Packing --> [*]
}
note right of Warehouse : pick pack and ship readiness
state Billing {
[*] --> ChargeCard
ChargeCard --> SendReceipt
SendReceipt --> [*]
}
Warehouse --> FulfillmentJoin
Billing --> FulfillmentJoin
state FulfillmentJoin <<join>>
FulfillmentJoin --> ShipmentChoice
state ShipmentChoice <<choice>>
ShipmentChoice --> ExpressShipping : express
ShipmentChoice --> StandardShipping : standard
state ExpressShipping {
[*] --> CourierPickup
CourierPickup --> InTransitExpress
InTransitExpress --> [*]
}
state StandardShipping {
[*] --> CarrierHandoff
CarrierHandoff --> InTransitStandard
InTransitStandard --> [*]
}
ExpressShipping --> DeliveryGate
StandardShipping --> DeliveryGate
state DeliveryGate <<join>>
DeliveryGate --> Delivered
note right of Delivered : carrier confirmation received
Delivered --> CustomerNotified : notify customer
CustomerNotified --> OrderClosed : feedback received
OrderClosed --> [*]
classDef process fill:#dbeafe,stroke:#2563eb,stroke-width:2px,color:#1e3a5f
classDef shipping fill:#ede9fe,stroke:#7c3aed,stroke-width:2px,color:#3b0764
classDef success fill:#dcfce7,stroke:#15803d,stroke-width:2px,color:#14532d
classDef terminal fill:#f0fdf4,stroke:#16a34a,stroke-width:2px,color:#14532d
classDef reject fill:#fee2e2,stroke:#dc2626,stroke-width:2px,color:#7f1d1d
class Validation,Warehouse,Billing process
class ExpressShipping,StandardShipping shipping
class Delivered,CustomerNotified success
class OrderClosed terminal
class Cancelled rejectGantt chart
Plan a cloud-migration program as a Gantt chart with governance, assessment, foundation, two delivery waves, and a critical path.
Rendering diagram...
Show the diagram code
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2d7d46', 'primaryTextColor': '#ffffff', 'primaryBorderColor': '#1a5c32', 'secondaryColor': '#eaf4ee', 'tertiaryColor': '#fce8e8', 'lineColor': '#666666', 'textColor': '#222222', 'fontSize': '13px', 'sectionBkgColor': '#eaf4ee', 'altSectionBkgColor': '#f5fbf7', 'gridColor': '#cccccc', 'critBkgColor': '#c0392b', 'critBorderColor': '#922b21', 'doneBkgColor': '#7f8c8d', 'doneBorderColor': '#5d6d7e', 'activeTaskBkgColor': '#27ae60', 'activeTaskBorderColor': '#1e8449', 'taskBkgColor': '#85c1e9', 'taskBorderColor': '#2e86c1', 'taskTextColor': '#1a1a1a', 'taskTextDarkColor': '#ffffff', 'milestoneBackgroundColor': '#f39c12', 'milestoneBorderColor': '#d68910'}}}%%
gantt
title Cloud Migration Master Plan
dateFormat YYYY-MM-DD
axisFormat %b %Y
tickInterval 1month
excludes weekends
todayMarker off
section Program Governance
Charter approved :milestone,done,m0,2024-01-08,0d
Steering committee formed :done,t1,2024-01-08,2024-01-19
Risk register established :done,t2,2024-01-22,2024-02-02
Budget approval :milestone,done,m1,2024-02-05,0d
PMO onboarding :done,t3,2024-02-06,2024-02-23
section Assessment and Design
Current state inventory :done,t4,2024-01-15,2024-02-09
Dependency mapping :done,t5,2024-02-12,2024-03-01
Target architecture design :done,t6,2024-02-19,2024-03-15
Architecture review board sign-off :milestone,done,m2,2024-03-18,0d
Migration runbooks created :done,t7,2024-03-19,2024-04-05
section Foundation Infrastructure
Landing zone provisioned :done,t8,2024-03-04,2024-03-22
Identity federation configured :done,t9,2024-03-25,2024-04-12
Network topology deployed :done,t10,2024-04-01,2024-04-19
Monitoring and alerting live :done,t11,2024-04-15,2024-04-30
Foundation complete :milestone,done,m3,2024-05-01,0d
section Wave 1 Workloads
Lift-and-shift batch jobs :crit,t12,2024-05-06,2024-05-31
Replatform dev environments :t13,2024-05-06,2024-05-24
Validate Wave 1 workloads :crit,t14,2024-06-03,2024-06-14
Wave 1 go-live :milestone,crit,m4,2024-06-17,0d
section Wave 2 Workloads - Critical Path
Database tier migration :active,crit,t15,2024-06-03,2024-07-12
Application server migration :active,crit,t16,2024-06-17,2024-08-02
Message bus migration :active,t17,2024-07-01,2024-07-26
Cache layer migration :active,t18,2024-07-15,2024-08-09
Wave 2 integration tests :crit,t19,2024-08-12,2024-09-06
Wave 2 performance test :crit,t20,2024-08-26,2024-09-13
Wave 2 go-live :milestone,crit,m5,2024-09-16,0d
section Security and Compliance
Penetration testing :crit,t21,2024-08-05,2024-08-30
SOC2 audit preparation :t22,2024-08-19,2024-09-13
Compliance sign-off :milestone,crit,m6,2024-09-23,0d
Legacy decommission :crit,t23,2024-09-24,2024-10-18
section Program Close
Hypercare support period :t24,2024-10-21,2024-11-15
Lessons learned workshop :t25,2024-11-04,2024-11-15
Final handover to ops :milestone,crit,m7,2024-11-18,0dMind map
Brainstorm a cloud platform as a mind map: compute, networking, storage, security, observability, and data.
Rendering diagram...
Show the diagram code
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#dbeafe', 'primaryTextColor': '#1e3a5f', 'primaryBorderColor': '#3b82f6', 'lineColor': '#94a3b8'}}}%%
mindmap
root((Cloud Platform))
[Compute]
(Kubernetes)
[Pods]
[Services]
(Helm Charts)
(Serverless)
[Functions]
[Triggers]
[Virtual Machines]
[Networking]
(Load Balancer)
(CDN)
{{DNS}}
(VPN)
[Storage]
((Object Store))
[Hot Tier]
[Cold Tier]
[Block Storage]
(File System)
[Security]
{{IAM}}
[Roles]
[Policies]
(MFA)
(WAF)
[SIEM]
[Observability]
(Metrics)
[Dashboards]
[Alerts]
[Logs]
(Log Search)
(Retention)
(Traces)
[Data]
((Data Warehouse))
[Stream Processor]
(ETL Pipeline)
{{Cache Layer}}
[Hot Cache]
[Warm Cache]Timeline
Tell the history of human communication as a timeline grouped into eras, with several events each.
Rendering diagram...
Show the diagram code
%%{init: {"theme": "forest"}}%%
timeline
title The Evolution of Human Communication
section Prehistoric Era
70000BC : Cave paintings begin
3500BC : Cuneiform writing invented
1500BC : Phoenician alphabet
600BC : Greek writing system refined
section Classical Antiquity
59BC : Roman newspaper Acta Diurna
105AD : Paper invented in China
400AD : Codex replaces scroll
600AD : Block printing in China
section Medieval Period
868 : Diamond Sutra printed
1040 : Movable type in China
1215 : Magna Carta manuscript
1450 : Gutenberg printing press
section Age of Print
1605 : First newspaper published
1660 : Royal Society scientific journal
1775 : Colonial postal service
1837 : Morse telegraph invented
section Industrial Age
1876 : Bell patents telephone
1895 : Marconi wireless radio
1920 : First radio broadcast
1939 : Television broadcasting begins
section Digital Dawn
1969 : ARPANET first packet
1983 : Internet protocols established
1991 : World Wide Web launched
1995 : Amazon and eBay founded
section Connected World
2004 : Facebook social network
2006 : Twitter microblogging
2012 : Smartphones reach one billion users
2020 : Video calls become daily lifeWant to try it? Open the chat and describe the diagram you need.