沃德利地图(v11.14.0+)
WARNING
Wardley 地图处于 beta 阶段。图表以 wardley-beta 关键字开头,在声明为稳定版之前,语法仍可能发生向后不兼容的变更。
沃德利地图是业务战略的可视化表示,用于映射价值链和组件演进。它们有助于识别战略机会、依赖关系,并指导技术决策。
简介
沃德利地图沿两个轴定位组件:
- 可见性(Y 轴):组件对用户而言的可见程度/价值(0.0 = 基础设施,1.0 = 面向用户)
- 演进(X 轴):组件的演进/成熟程度(0.0 = 起源/新颖,1.0 = 商品化/公共事业)
这种双重定位可用于以下方面的战略分析:
- 价值链依赖
- 组件随时间的演进
- 自建还是购买的决策
- 惯性与对变革的阻力
基本示例
代码:
mermaid
wardley-beta
title Tea Shop Value Chain
anchor Business [0.95, 0.63]
component Cup of Tea [0.79, 0.61]
component Tea [0.63, 0.81]
component Hot Water [0.52, 0.80]
component Kettle [0.43, 0.35]
component Power [0.10, 0.70]
Business -> Cup of Tea
Cup of Tea -> Tea
Cup of Tea -> Hot Water
Hot Water -> Kettle
Kettle -> Power
evolve Kettle 0.62
evolve Power 0.89
note "Standardising power allows Kettles to evolve faster" [0.30, 0.49]
语法
图声明
每个沃德利地图都以 wardley-beta 关键字开头:
代码:
mermaid
wardley-beta
title Your Map Title
size [1100, 600]
wardley-beta- 必需的图表类型标识符(beta 版本)title- 可选标题,显示在顶部size- 可选的画布尺寸,单位为像素(默认值:[1100, 600])
坐标系
重要:沃德利地图使用 OnlineWardleyMaps (OWM) 格式:[visibility, evolution]
- 第一个值(可见性):0.0-1.0(从下到上)- Y 轴位置
- 第二个值(演进):0.0-1.0(从左到右)- X 轴位置
这与常见的 (x, y) 表示法相反!
代码:
mermaid
wardley-beta
title Coordinate Examples
component Infrastructure [0.30, 0.20] %% Low visibility, low evolution
component Product [0.70, 0.60] %% High visibility, mid evolution
component User Need [0.90, 0.95] %% High visibility, high evolution
组件与锚点
组件
txt
component Name [visibility, evolution]
component Name [visibility, evolution] label [offsetX, offsetY]
component Name [visibility, evolution] (decorator)示例:
代码:
mermaid
wardley-beta
title Components
component API [0.60, 0.70]
component Database [0.40, 0.85] label [-50, 10]
component "Custom Service" [0.55, 0.35]
名称可以包含连字符(real-time processing、end-user),无需加引号。只有当名称以非字母开头,或包含语法不接受的其他字符时,才需要加引号。
代码:
mermaid
wardley-beta
title Hyphenated Names
component real-time processing [0.55, 0.40]
component end-user [0.90, 0.95]
end-user -> real-time processing
锚点
锚点表示用户或客户,并以粗体标签显示:
代码:
mermaid
wardley-beta
title Anchors
anchor Customer [0.90, 0.95]
anchor Business [0.85, 0.90]
component Service [0.70, 0.75]
Customer -> Service
Business -> Service
装饰器
惯性
标记不易改变的组件:
代码:
mermaid
wardley-beta
title Inertia
component Legacy System [0.45, 0.40] (inertia)
component New Platform [0.65, 0.45]
Legacy System -> New Platform
来源策略
表示自建/购买/外包的决策:
(build)- 三角形符号(buy)- 菱形符号(outsource)- 正方形符号(market)- 圆形符号
代码:
mermaid
wardley-beta
title Sourcing Strategy
anchor Customer [0.80, 0.95]
component Custom App [0.45, 0.85] (build)
component Off-the-shelf Tool [0.85, 0.65] (buy)
component Managed Service [0.60, 0.40] (outsource)
component Cloud Platform [0.95, 0.25] (market)
Customer -> Custom App
Custom App -> Off-the-shelf Tool
Custom App -> Managed Service
Off-the-shelf Tool -> Cloud Platform
链接与依赖
txt
A -> B %% Basic dependency
A --> B %% Basic dependency (alternative style)
A -> B; label %% With annotation
A -.-> B %% Dashed flow
A +> B %% Flow (with arrow marker)
A +< B %% Reverse flow
A +<> B %% Bi-directional flow
A +'text'> B %% Labeled flow示例:
代码:
mermaid
wardley-beta
title Link Types
component User [0.90, 0.95]
component App [0.75, 0.75]
component API [0.60, 0.60]
component Cache [0.65, 0.45]
component Database [0.15, 0.80]
User -> App
App +> API
API -> Database
API +<> Cache
Cache +'backup'> Database
演进与移动
演进箭头
用红色虚线箭头显示组件演进:
代码:
mermaid
wardley-beta
title Evolution
component Database [0.40, 0.50]
component API [0.55, 0.60]
Database -> API
evolve Database 0.75
evolve API 0.80
趋势指示
显示预测的未来位置:
txt
Component -.- (x, y)注意:趋势使用标准的 (x, y) 顺序,而不是 [visibility, evolution]!
流水线
流水线组件共享可见性,仅随演进而变化:
代码:
mermaid
wardley-beta
title Pipeline Evolution
component Database [0.40, 0.60]
pipeline Database {
component "File System" [0.25]
component "SQL DB" [0.50]
component "NoSQL" [0.70]
component "Cloud DB" [0.85]
}
自定义演进阶段
定义自定义轴标签:
代码:
mermaid
wardley-beta
title Custom Stages
evolution Unmodelled -> Divergent -> Convergent -> Modelled
component Raw Data [0.15, 0.20]
component Analysis [0.45, 0.50]
component Reports [0.75, 0.70]
双重标签
代码:
mermaid
wardley-beta
title Dual Label Stages
evolution Genesis / Concept -> Custom / Emerging -> Product / Converging -> Commodity / Accepted
component Novel Idea [0.05, 0.20]
component Custom Solution [0.35, 0.50]
component Product [0.65, 0.70]
component Utility [0.95, 0.90]
自定义阶段宽度
使用 @ 表示法指定自定义边界宽度:
代码:
mermaid
wardley-beta
title Custom Widths
evolution Genesis@0.2 -> Custom@0.4 -> Product@0.75 -> Commodity@1.0
component Novel [0.75, 0.15]
component Bespoke [0.70, 0.35]
component Product [0.65, 0.65]
component Utility [0.60, 0.90]
标注与注释
注释
在特定坐标添加上下文注释:
note "text" [visibility, evolution]注意:文本必须用引号括起来。
代码:
mermaid
wardley-beta
title Notes
component API [0.60, 0.70]
component Database [0.40, 0.50]
API -> Database
note "Critical decision point" [0.65, 0.55]
note "High risk area" [0.40, 0.35]
编号标注
创建带可选标注框的编号引用:
annotations [x, y] # Optional: position for annotation numbers
annotation number,[x, y] "text"注意:标注文本必须用引号括起来。
代码:
mermaid
wardley-beta
title Annotations
component API [0.60, 0.70]
component Cache [0.50, 0.55]
component Database [0.40, 0.40]
API -> Cache
Cache -> Database
annotations [0.10, 0.90]
annotation 1,[0.60, 0.65] "Critical component"
annotation 2,[0.50, 0.50] "Performance layer"
annotation 3,[0.40, 0.35] "Data persistence"
视觉元素
加速因素与减速因素
影响演进的力量:
代码:
mermaid
wardley-beta
title Forces
component Legacy [0.20, 0.85]
component Modern [0.55, 0.60]
component AI [0.70, 0.35]
Legacy -> Modern
Modern -> AI
accelerator "AI Adoption" [0.55, 0.25]
deaccelerator "Legacy Constraints" [0.15, 0.75]
高级功能
标签定位
微调标签位置:
txt
component Name [visibility, evolution] label [offsetX, offsetY]负值 X 向左移动,正值 X 向右移动。 负值 Y 向上移动,正值 Y 向下移动。
自定义画布尺寸
代码:
mermaid
wardley-beta
title Custom Size
size [800, 1000]
完整示例
代码:
mermaid
wardley-beta
title Software Platform Strategy
size [1100, 800]
evolution Genesis@0.25 -> Custom@0.5 -> Product@0.75 -> Commodity@1.0
anchor Customer [0.90, 0.95]
component "Mobile App" [0.80, 0.85] (build)
component "Web App" [0.75, 0.80] label [-60, 10] (build)
component "API Gateway" [0.70, 0.65] (buy)
component "Auth Service" [0.60, 0.55] (outsource)
component "Database" [0.50, 0.45] (buy) (inertia)
component "Cloud Platform" [0.30, 0.95] (market)
Customer -> "Mobile App"
Customer -> "Web App"
"Mobile App" -> "API Gateway"
"Web App" -> "API Gateway"
"API Gateway" -> "Auth Service"
"API Gateway" -> "Database"
"Database" -> "Cloud Platform"
evolve "API Gateway" 0.85
evolve "Database" 0.75
accelerator "Cloud Native" [0.20, 0.85]
deaccelerator "Legacy Data" [0.45, 0.35]
annotations [0.10, 0.20]
annotation 1,[0.78, 0.82] "User touchpoints"
annotation 2,[0.70, 0.60] "Integration layer"
annotation 3,[0.50, 0.40] "Data persistence"
note "Build mobile-first experience" [0.85, 0.90]
note "Migrate to cloud-native database" [0.60, 0.50]
配置
沃德利地图支持 Mermaid 的主题系统。使用标准 Mermaid 配置自定义外观。
资源
- Wardley Mapping Book,Simon Wardley 著
- OnlineWardleyMaps - 交互式映射工具
- 沃德利地图社区
- 学习沃德利映射
语法汇总
| 元素 | 语法 | 示例 |
|---|---|---|
| 图表 | wardley-beta | wardley-beta |
| 标题 | title Text | title My Map |
| 尺寸 | size [width, height] | size [1100, 800] |
| 组件 | component Name [vis, evo] | component API [0.6, 0.7] |
| 锚点 | anchor Name [vis, evo] | anchor User [0.9, 0.95] |
| 链接 | A -> B | API -> Database |
| 流 | A +> B | User +> API |
| 演进 | evolve Name targetEvo | evolve API 0.85 |
| 注释 | note "Text" [vis, evo] | note "Key insight" [0.4, 0.5] |
| 标注 | annotation N,[x,y] "Text" | annotation 1,[0.5,0.5] "Critical" |
| 惯性 | (inertia) | component DB [0.4, 0.6] (inertia) |
| 策略 | (build|buy|outsource|market) | component API [0.6, 0.7] (buy) |
| 流水线 | pipeline Parent { ... } | 参见上文的流水线示例 |
| 演进 | evolution Stage1 -> Stage2 -> ... | 参见上文的演进示例 |
限制
- 沃德利地图目前不支持手绘/草图模式(
look: handDrawn)。该图使用自定义的 D3 渲染器,而非共享的形状系统。