SVG Diagram Type Templates

34 static SVG archetypes (Forge palette: cyan / amber / slate surfaces), extensible over time — aligned with diagram-as-code in the same design system: each family explains the closest native grammars, and each card lists matching types (e.g. flowchart, gantt, xychart-beta). Click a card for the modal legend. Scroll to diagram-as-code parallels for live samples per template key, or Diagram-as-code examples for the full mermaid@10 catalog (sequence, state, class, ER, C4, Git graph, …).

For JSON-driven metrics charts (same charts envelope as forge-lenses), see the Data charts hub (static · API fetch).

ASCII diagrams

In Markdown, the ```blueprint-diagram-ascii fence (alias ```ks-diagram-ascii) renders box-drawing in the same .forge-diagram shell as Mermaid and SVG tiles. Optional key:, alt:, caption:, and expand: lines form a prefix; the first line that does not match begins the art. With a valid catalog key: and expand: true, the figure opens the same legend modal as static SVG tiles. Heuristics for choosing key: from ASCII intent are in docs/ascii-to-ks-diagrams.md in the repository.

+------+     +------+     +------+
|  A   | --> |  B   | --> |  C   |
+------+     +------+     +------+
Same catalog key as the SVG linear template
+------+     +------+
|  A   | --> |  B   |
+------+     +------+

Process & flow

How work moves through stages — same visual language as flowchart and journey-style narratives.

Primary diagram-as-code parallels: flowchart (LR/TD, decisions, subgraph swimlanes) and journey. Volume narrowing is approximated with sankey-beta on the Diagram-as-code examples page.

linear-flow

Diagram-as-code: flowchart · journey

loop-cycle

Diagram-as-code: flowchart

gate-chain

Diagram-as-code: flowchart

swimlane

Diagram-as-code: flowchart · subgraph

decision-flow

Diagram-as-code: flowchart

funnel

Diagram-as-code: flowchart · sankey-beta

Structural & relational

Hierarchy, boards, and relationships — align with flowchart, mindmap, and (for networks) graph edges. Tree = generic node boxes; org chart = people cards (avatar, name, title, team line).

Maps to flowchart trees and org-style TD layouts, mindmap, and dense links similar to flowchart --- / --> edges. classDiagram / erDiagram cover typed relations on Diagram-as-code examples.

tree

Diagram-as-code: flowchart · mindmap

org-chart

Diagram-as-code: flowchart

board-columns

Diagram-as-code: flowchart · block-beta

checklist

Diagram-as-code: flowchart

network

Diagram-as-code: flowchart

venn

Diagram-as-code: (no direct grammar — use SVG or other tools)

Timeline & scheduling

Time-based views — pair with gantt and timeline grammars.

Direct grammars: gantt and timeline. Roadmaps often combine both; see Diagram-as-code examples.

gantt

Diagram-as-code: gantt

timeline

Diagram-as-code: timeline

roadmap

Diagram-as-code: timeline · gantt

Cartesian charts

Category and time-series on X/Y axes — bar, line, area, stacked bars, scatter, and waterfall bridges. Native grammars cover most via xychart-beta and quadrantChart; waterfall is SVG-first.

xychart-beta for bar, line, and multi-series; quadrantChart for scatter-like placement. Waterfall has no stock grammar in our pinned build — use the SVG template or BI tools. See Diagram-as-code examples.

bar-chart

Diagram-as-code: xychart-beta

line-chart

Diagram-as-code: xychart-beta

stacked-bar

Diagram-as-code: xychart-beta

area-chart

Diagram-as-code: xychart-beta

scatter

Diagram-as-code: quadrantChart

waterfall

Diagram-as-code: (no direct grammar — use SVG or other tools)

Polar & composition

Parts-of-whole, multi-axis profiles, and nested rings — pie/donut, radar, and sunburst-style breakdowns. Only pie maps cleanly to native pie syntax; the rest are SVG-first.

pie is native. Radar and nested donut archetypes are Forge-styled SVG — use these cards or external charting. See Diagram-as-code examples for pie syntax.

pie-donut

Diagram-as-code: pie

radar

Diagram-as-code: (no direct grammar — use SVG or other tools)

nested-donut

Diagram-as-code: (no direct grammar — use SVG or other tools)

Comparison & status

Quadrants, gauges, KPI tiles, and bullet charts — quadrant via quadrantChart; gauges, bullets, and KPI cards are usually custom SVG or BI exports.

quadrantChart is native; gauges, KPI cards, and bullet charts have no stock type in our pinned build — keep these templates or embed from analytics tools.

quadrant

Diagram-as-code: quadrantChart

gauge

Diagram-as-code: (no direct grammar — use SVG or other tools)

kpi-card

Diagram-as-code: (no direct grammar — use SVG or other tools)

bullet-chart

Diagram-as-code: (no direct grammar — use SVG or other tools)

Interaction & behavior

Message order across actors and finite-state lifecycles — pair with sequence and state diagrams.

Native: sequenceDiagram for lifelines and stateDiagram-v2 for states. Full syntax on Diagram-as-code examples.

sequence

Diagram-as-code: sequenceDiagram

state-machine

Diagram-as-code: stateDiagram-v2

Autonomy methodology

Forge autonomy ladder, sub-level run evidence, and maturity score composition — content instances live in Blueprints and Platform handbooks.

SVG-first methodology diagrams; no diagram-as-code grammar. Content instances: methodology-autonomy-ladder-l1-l4-grades.svg and siblings in Blueprints.

autonomy-ladder-grades

Diagram-as-code: (no direct grammar — use SVG or other tools)

sublevel-run-evidence-flow

Diagram-as-code: (no direct grammar — use SVG or other tools)

maturity-score-composition

Diagram-as-code: (no direct grammar — use SVG or other tools)

Specialized

Heatmaps and other dense matrices — not in default bundle as first-class grammars.

No default mermaid@10 heatmap grammar; use this SVG archetype or external charting. Other specialized diagrams (e.g. requirementDiagram, gitGraph, C4) live on Diagram-as-code examples.

heatmap

Diagram-as-code: (no direct grammar — use SVG or other tools)

Diagram-as-code parallels

Each block is diagram-as-code with the same render_mermaid_block wrapper as handbook and product pages. Use it when you want editable source; use the SVG cards above when you need exact Forge styling. Click a rendered diagram to open it in the lightbox (same as expandable blocks on handbook pages). Some archetypes have no close native grammar — keep the static template or use BI/design tools.

For the full catalog (C4, ER, Sankey, Git graph, …), see Diagram-as-code examples.

Process & flow

flowchart LR subgraph Plan["Plan"] A["Backlog"] --> B["Refine"] end subgraph Build["Build"] B --> C["Implement"] C --> D["Test"] end D --> E["Release"]
flowchart LR subgraph Cycle["Improvement loop"] Plan[Plan] --> Build[Build] Build --> Measure[Measure] Measure --> Learn[Learn] Learn --> Plan end
flowchart TD Draft[Draft artifact] --> G1{Peer review?} G1 -->|Fail| Revise[Revise] Revise --> Draft G1 -->|Pass| G2{Policy check?} G2 -->|Fail| Revise G2 -->|Pass| Ship[Ship]
flowchart TB subgraph Design["Design"] D1[Spec] --> D2[Mockups] D2 --> D3[Review] end subgraph Eng["Engineering"] E1[Build] --> E2[Test] E2 --> E3[Deploy prep] end D3 --> E1
flowchart TD Start([Start]) --> Q1{On track?} Q1 -->|Yes| Q2{Scope stable?} Q2 -->|Yes| Ship[Release] Q2 -->|No| Negotiate[Re-scope] Negotiate --> Q1 Q1 -->|No| Rework[Iterate] Rework --> Q1
flowchart TD L[Leads] --> Q[Qualified] Q --> O[Opportunities] O --> P[Proposals] P --> W[Wins] Q -.->|Nurture| L

Structural & relational

flowchart TD Root[Root capability] --> A[Branch A] Root --> B[Branch B] Root --> C[Branch C] A --> A1[Leaf] A --> A2[Leaf] B --> B1[Leaf] C --> C1[Leaf]
flowchart TD CEO([CEO]) CEO --> CTO[Chief Technology Officer] CEO --> CFO[Chief Financial Officer] CTO --> VPE[VP Engineering] CTO --> VPP[VP Product] VPE --> TL1[Platform lead] VPE --> TL2[App lead] CFO --> CTL[Controller]
flowchart LR subgraph Todo["Todo"] T[Ticket] end subgraph Doing["Doing"] D[Ticket] end subgraph Done["Done"] X[Ticket] end T --> D --> X
flowchart TD C1[Define scope] --> C2[Design] C2 --> C3[Build] C3 --> C4[Verify] C4 --> C5[Ship] C4 -->|Fail| C3
flowchart LR GW[Gateway] --> S1[Service A] GW --> S2[Service B] S1 --- S3[Service C] S2 --- S3 S1 --- DB[(Data)]

No stock grammar matches this archetype; use the SVG template card or an external graphic.

Timeline & scheduling

gantt title Roadmap slice dateFormat YYYY-MM-DD axisFormat %b %d section Discovery Research :done, a0, 2024-01-01, 7d section Build Alpha :a1, after a0, 14d Beta :a2, after a1, 10d section Release GA :crit, a3, after a2, 5d
timeline title Releases section 2023 Alpha : milestone Beta launch : milestone section 2024 GA : milestone Patch train : milestone
timeline title Product themes section Now Hardening : milestone Reliability : milestone section Next Scale-out : milestone section Later New markets : milestone

Cartesian charts

xychart-beta title "Quarterly throughput" x-axis [Q1, Q2, Q3, Q4] y-axis "Items" 0 --> 120 bar [40, 55, 70, 90]
xychart-beta title "Latency trend" x-axis [w1, w2, w3, w4] y-axis "ms" 0 --> 200 line [120, 100, 85, 72]
xychart-beta title "Two series (grouped, not stacked)" x-axis [A, B, C] y-axis "Units" 0 --> 80 bar [20, 35, 40] bar [15, 25, 30]
xychart-beta title "Line proxy for area charts" x-axis [t1, t2, t3, t4] y-axis "Value" 0 --> 100 line [20, 45, 40, 70]
quadrantChart title Experiment results x-axis Low cost --> High cost y-axis Low yield --> High yield quadrant-1 Scale quadrant-2 Investigate quadrant-3 Low priority quadrant-4 Quick experiments Run A: [0.25, 0.8] Run B: [0.6, 0.35] Run C: [0.45, 0.55] Run D: [0.15, 0.25]

No stock grammar matches this archetype; use the SVG template card or an external graphic.

Polar & composition

pie showData title Work mix "Build" : 45 "Review" : 25 "Plan" : 20 "Ops" : 10

No stock grammar matches this archetype; use the SVG template card or an external graphic.

No stock grammar matches this archetype; use the SVG template card or an external graphic.

Comparison & status

quadrantChart title Prioritization x-axis Low effort --> High effort y-axis Low impact --> High impact quadrant-1 Quick wins quadrant-2 Major bets quadrant-3 Fill-ins quadrant-4 Time sinks Feature A: [0.2, 0.75] Feature B: [0.65, 0.35] Feature C: [0.4, 0.5]

No stock grammar matches this archetype; use the SVG template card or an external graphic.

No stock grammar matches this archetype; use the SVG template card or an external graphic.

No stock grammar matches this archetype; use the SVG template card or an external graphic.

Interaction & behavior

sequenceDiagram participant Client participant Service participant Store Client->>Service: Call one Service->>Store: Call two Store-->>Service: Return data Service-->>Client: Final reply
stateDiagram-v2 [*] --> Idle Idle --> Active: Submit Active --> Succeeded: Complete Active --> Failed: Error Failed --> Idle: Retry

Autonomy methodology

No sample wired for this key yet.

No sample wired for this key yet.

No sample wired for this key yet.

Specialized

No stock grammar matches this archetype; use the SVG template card or an external graphic.