drawio-diagrams-enhanced
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEnhanced Draw.io Diagram Creation with MCP Integration
集成MCP的增强版Draw.io图表创建
Create professional diagrams using the next-ai-draw-io MCP server. Generate mxGraphModel XML for real-time browser preview and editing.
借助next-ai-draw-io MCP服务器创建专业图表。生成mxGraphModel XML以实现浏览器实时预览与编辑。
MCP Workflow
MCP工作流
1. Start Session
1. 启动会话
Call tool first to open browser with real-time preview.
start_session首先调用工具,打开浏览器进行实时预览。
start_session2. Create New Diagram
2. 创建新图表
Use tool with mxGraphModel XML (not full mxfile wrapper):
create_new_diagramxml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>Critical constraints:
- Keep elements within x=0-800, y=0-600
- Start from x=40, y=40 with tight spacing
- Use unique IDs starting from "2"
- Set parent="1" for top-level shapes
- Specify exitX/exitY/entryX/entryY for edges to avoid overlaps
使用工具并传入mxGraphModel XML(无需完整mxfile包装器):
create_new_diagramxml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>关键约束:
- 元素需保持在x=0-800、y=0-600范围内
- 从x=40、y=40开始布局,保持紧凑间距
- 使用从"2"开始的唯一ID
- 顶级图形需设置parent="1"
- 为连接线指定exitX/exitY/entryX/entryY以避免重叠
3. Edit Existing Diagram
3. 编辑现有图表
For modifications, call first to see current structure, then use with operations array.
get_diagramedit_diagram如需修改,先调用查看当前结构,再使用传入操作数组。
get_diagramedit_diagram4. Get Current State
4. 获取当前状态
Use to retrieve current XML including user's manual edits.
get_diagram使用获取包含用户手动编辑内容的当前XML。
get_diagramCore Capabilities
核心能力
1. Standard Diagram Types
1. 标准图表类型
- Flowcharts: Basic flowcharts, decision trees, process flows
- Cross-Functional Flowcharts (CFF): Swimlane diagrams showing processes across departments/roles
- BPMN Diagrams: Business Process Model and Notation diagrams
- UML Diagrams: Class diagrams, sequence diagrams, use case diagrams
- Network Diagrams: Infrastructure, cloud architecture, system design
- Org Charts: Organizational hierarchies and team structures
- Mind Maps: Conceptual mapping and brainstorming
- Entity Relationship Diagrams: Database schemas
- 流程图:基础流程图、决策树、流程流
- 跨职能流程图(CFF):展示跨部门/角色流程的泳道图
- BPMN图表:业务流程建模与标注图表
- UML图表:类图、序列图、用例图
- 网络图:基础设施、云架构、系统设计图
- 组织结构图:组织层级与团队结构图
- 思维导图:概念映射与头脑风暴图
- 实体关系图:数据库架构图
2. PMP/PMBOK Project Management Diagrams
2. PMP/PMBOK项目管理图表
- Work Breakdown Structure (WBS): Hierarchical decomposition of project deliverables
- Project Network Diagrams: PERT charts, CPM, activity dependencies
- Gantt Charts: Timeline-based project schedules
- RACI Matrices: Responsibility assignment matrices
- Risk Register Diagrams: Risk matrices, heat maps, probability-impact grids
- Stakeholder Maps: Power-interest grids, influence diagrams
- Resource Histograms: Resource allocation and capacity planning
- Communication Plans: Information flow diagrams
- Process Group Diagrams: Initiating, Planning, Executing, Monitoring & Controlling, Closing
- Knowledge Area Maps: Integration, Scope, Schedule, Cost, Quality, Resource, Communications, Risk, Procurement, Stakeholder Management
- 工作分解结构(WBS):项目可交付成果的层级分解图
- 项目网络图:PERT图、关键路径法(CPM)、活动依赖图
- 甘特图:基于时间线的项目进度图
- RACI矩阵:职责分配矩阵
- 风险登记册图:风险矩阵、热图、概率-影响网格
- 干系人地图:权力-利益网格、影响图
- 资源直方图:资源分配与容量规划图
- 沟通计划图:信息流图
- 过程组图:启动、规划、执行、监控与控制、收尾
- 知识领域图:整合、范围、进度、成本、质量、资源、沟通、风险、采购、干系人管理
3. Visual Asset Libraries Available
3. 可用的视觉资源库
Agents can reference and incorporate shapes from extensive custom libraries:
Icon & Symbol Libraries:
- Material Design Icons
- Font Awesome icons
- OSA (Open Security Architecture) Icons
- UN-OCHA Humanitarian Icons
- Flat Color Icons
- Chart & Infographic Icons
- Windows 10 Icons
- Gesture & Fingerprint Icons
Technology & Infrastructure:
- Kubernetes Icons
- Cloud Provider Icons (AWS, Azure, GCP, DigitalOcean)
- Network Device Libraries (Cisco, Arista, Fortinet, Commvault)
- DevOps & CI/CD Pipeline Shapes
Business & General Purpose:
- Wireframe Components
- Avatars & People Icons
- Form Elements
- Bioicons (Life Sciences)
- Genogram Symbols
- Templates & Building Blocks
How to Use Custom Libraries:
When generating diagrams that would benefit from specific icons, Agents can note which libraries to enable:
To use this diagram optimally, open it with these custom libraries:
https://app.diagrams.net/?clibs=Uhttps://jgraph.github.io/drawio-libs/libs/templates.xmlAgent可引用并整合来自丰富自定义库的图形:
图标与符号库:
- Material Design Icons
- Font Awesome icons
- OSA(Open Security Architecture)Icons
- UN-OCHA Humanitarian Icons
- Flat Color Icons
- 图表与信息图标
- Windows 10 Icons
- 手势与指纹图标
技术与基础设施库:
- Kubernetes Icons
- 云服务商图标(AWS、Azure、GCP、DigitalOcean)
- 网络设备库(Cisco、Arista、Fortinet、Commvault)
- DevOps与CI/CD流水线图形
业务与通用库:
- 线框组件
- 头像与人形图标
- 表单元素
- Bioicons(生命科学)
- 家谱图符号
- 模板与构建块
自定义库使用方法:
当生成的图表可受益于特定图标时,Agent可标注需启用的库:
为优化使用本图表,请通过以下链接打开并加载自定义库:
https://app.diagrams.net/?clibs=Uhttps://jgraph.github.io/drawio-libs/libs/templates.xmlXML Format for MCP
MCP适用的XML格式
For MCP tools, output only mxGraphModel (not full mxfile):
xml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>For standalone files, use full mxfile wrapper:
xml
<mxfile host="app.diagrams.net">
<diagram id="diagram-1" name="Page-1">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>对于MCP工具,仅输出mxGraphModel(无需完整mxfile):
xml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>对于独立文件,使用完整mxfile包装器:
xml
<mxfile host="app.diagrams.net">
<diagram id="diagram-1" name="Page-1">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>Core Concepts
核心概念
1. Cells (mxCell)
1. 单元格(mxCell)
Everything in draw.io is a cell - shapes, connectors, containers, and even the root elements.
Basic Shape Cell:
xml
<mxCell id="2" value="Process Step" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>Connector Cell:
xml
<mxCell id="3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>draw.io中的所有元素都是单元格——图形、连接线、容器,甚至根元素。
基础图形单元格:
xml
<mxCell id="2" value="Process Step" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>连接线单元格:
xml
<mxCell id="3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>2. ID Management
2. ID管理
- Each cell must have a unique ID
- Use sequential integers: "2", "3", "4", etc.
- IDs "0" and "1" are reserved for the root cells
- When referencing shapes in connectors, use the same IDs
- 每个单元格必须拥有唯一ID
- 使用连续整数:"2"、"3"、"4"等
- ID "0"和"1"为根单元格保留
- 在连接线中引用图形时,需使用相同ID
3. Geometry (mxGeometry)
3. 几何属性(mxGeometry)
- ,
x: Position (top-left corner)y - ,
width: Dimensionsheight - : For connectors (relative positioning)
relative="1"
- ,
x:位置(左上角)y - ,
width:尺寸height - :用于连接线(相对定位)
relative="1"
4. Styling
4. 样式设置
Styles are semicolon-separated key-value pairs:
- Shape type: ,
rounded=1,ellipserhombus - Colors: ,
fillColor=#dae8fc,strokeColor=#6c8ebffontColor=#000000 - Text: ,
fontSize=12(bold=1, italic=2, underline=4)fontStyle=1 - Alignment: ,
align=centerverticalAlign=middle - Spacing: ,
spacingLeft=10spacingTop=5
样式为分号分隔的键值对:
- 图形类型:、
rounded=1、ellipserhombus - 颜色:、
fillColor=#dae8fc、strokeColor=#6c8ebffontColor=#000000 - 文本:、
fontSize=12(粗体=1,斜体=2,下划线=4)fontStyle=1 - 对齐方式:、
align=centerverticalAlign=middle - 间距:、
spacingLeft=10spacingTop=5
PMP/PMBOK Specific Shapes & Styles
PMP/PMBOK专属图形与样式
Work Breakdown Structure (WBS)
工作分解结构(WBS)
WBS uses hierarchical tree structure with boxes connected by lines.
WBS Package Box:
shape=rectangle;rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;fontSize=10;WBS Levels:
- Level 0 (Project): Large box, 200x80, bold, dark green
- Level 1 (Deliverables): Medium box, 160x60, medium green
- Level 2 (Sub-deliverables): Small box, 140x50, light green
- Level 3 (Work Packages): Smallest box, 120x40, lightest green
WBS采用带连接线的层级树形结构。
WBS包框样式:
shape=rectangle;rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;fontSize=10;WBS层级:
- 0级(项目):大尺寸框,200x80,粗体,深绿色
- 1级(可交付成果):中等尺寸框,160x60,中绿色
- 2级(子可交付成果):小尺寸框,140x50,浅绿色
- 3级(工作包):最小尺寸框,120x40,最浅绿色
Project Network Diagram (PERT/CPM)
项目网络图(PERT/CPM)
Activity Node (AON - Activity on Node):
shape=rectangle;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=0;Node Structure (divided into sections):
┌─────────────────┐
│ Early Start ES │ Duration
├─────────────────┤
│ Activity Name │
├─────────────────┤
│ Late Start LS │ Late Finish LF
└─────────────────┘Critical Path Highlighting:
fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=3;活动节点(AON - 节点式活动):
shape=rectangle;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=0;节点结构(分为多个区域):
┌─────────────────┐
│ Early Start ES │ Duration
├─────────────────┤
│ Activity Name │
├─────────────────┤
│ Late Start LS │ Late Finish LF
└─────────────────┘关键路径高亮样式:
fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=3;RACI Matrix
RACI矩阵
Matrix Container:
swimlane;html=1;startSize=40;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1;RACI Cells:
- R (Responsible):
fillColor=#d5e8d4;strokeColor=#82b366; - A (Accountable):
fillColor=#dae8fc;strokeColor=#6c8ebf; - C (Consulted):
fillColor=#fff2cc;strokeColor=#d6b656; - I (Informed):
fillColor=#e1d5e7;strokeColor=#9673a6;
矩阵容器样式:
swimlane;html=1;startSize=40;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1;RACI单元格样式:
- R(负责):
fillColor=#d5e8d4;strokeColor=#82b366; - A(批准):
fillColor=#dae8fc;strokeColor=#6c8ebf; - C(咨询):
fillColor=#fff2cc;strokeColor=#d6b656; - I(告知):
fillColor=#e1d5e7;strokeColor=#9673a6;
Gantt Chart Elements
甘特图元素
Timeline Bar:
rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;Milestone Diamond:
rhombus;whiteSpace=wrap;html=1;fillColor=#fa6800;strokeColor=#C73500;fontColor=#000000;Dependency Arrow:
edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;endFill=1;strokeWidth=2;时间线栏样式:
rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;里程碑菱形样式:
rhombus;whiteSpace=wrap;html=1;fillColor=#fa6800;strokeColor=#C73500;fontColor=#000000;依赖箭头样式:
edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;endFill=1;strokeWidth=2;Risk Matrix (Probability-Impact Grid)
风险矩阵(概率-影响网格)
Risk Matrix Structure:
5x5 grid with:
- X-axis: Impact (Very Low, Low, Medium, High, Very High)
- Y-axis: Probability (Very Low, Low, Medium, High, Very High)Risk Level Colors:
- Low Risk: (Green)
fillColor=#d5e8d4;strokeColor=#82b366; - Medium Risk: (Yellow)
fillColor=#fff2cc;strokeColor=#d6b656; - High Risk: (Orange)
fillColor=#ffe6cc;strokeColor=#d79b00; - Critical Risk: (Red)
fillColor=#f8cecc;strokeColor=#b85450;
风险矩阵结构:
5x5网格:
- X轴:影响(极低、低、中、高、极高)
- Y轴:概率(极低、低、中、高、极高)风险等级颜色:
- 低风险:(绿色)
fillColor=#d5e8d4;strokeColor=#82b366; - 中风险:(黄色)
fillColor=#fff2cc;strokeColor=#d6b656; - 高风险:(橙色)
fillColor=#ffe6cc;strokeColor=#d79b00; - 关键风险:(红色)
fillColor=#f8cecc;strokeColor=#b85450;
Stakeholder Power-Interest Grid
干系人权力-利益网格
Quadrant Structure:
┌─────────────────┬─────────────────┐
│ Manage │ Partner │
│ Closely │ Closely │
│ (High Power, │ (High Power, │
│ High Interest) │ High Interest) │
├─────────────────┼─────────────────┤
│ Keep │ Keep │
│ Satisfied │ Informed │
│ (High Power, │ (Low Power, │
│ Low Interest) │ High Interest) │
└─────────────────┴─────────────────┘象限结构:
┌─────────────────┬─────────────────┐
│ 重点管理 │ 紧密合作 │
│ (高权力、高利益)│ (高权力、高利益)│
├─────────────────┼─────────────────┤
│ 保持满意 │ 及时告知 │
│ (高权力、低利益) │ (低权力、高利益)│
└─────────────────┴─────────────────┘Common Shape Styles
常见图形样式
Flowchart Shapes
流程图图形
Process (Rectangle):
rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;Decision (Diamond):
rhombus;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;Start/End (Rounded Rectangle):
ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;Document:
shape=document;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;Data (Parallelogram):
shape=parallelogram;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;流程(矩形):
rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;决策(菱形):
rhombus;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;开始/结束(圆角矩形):
ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;文档:
shape=document;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;数据(平行四边形):
shape=parallelogram;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;Swimlane Shapes
泳道图形
Swimlane Container:
swimlane;html=1;startSize=20;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;Vertical Swimlane:
swimlane;html=1;startSize=20;fillColor=#f5f5f5;strokeColor=#666666;horizontal=0;fontStyle=1;泳道容器:
swimlane;html=1;startSize=20;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;垂直泳道:
swimlane;html=1;startSize=20;fillColor=#f5f5f5;strokeColor=#666666;horizontal=0;fontStyle=1;Creating PMP/PMBOK Diagrams
创建PMP/PMBOK图表
Work Breakdown Structure (WBS) Example
工作分解结构(WBS)示例
xml
<mxfile host="app.diagrams.net">
<diagram id="WBS-1" name="Project WBS">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10" guides="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Level 0: Project -->
<mxCell id="2" value="Project Name" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;fontStyle=1;fontSize=14;" vertex="1" parent="1">
<mxGeometry x="280" y="40" width="200" height="80" as="geometry"/>
</mxCell>
<!-- Level 1: Major Deliverables -->
<mxCell id="3" value="Deliverable 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="40" y="160" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="4" value="Deliverable 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="240" y="160" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="5" value="Deliverable 3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="440" y="160" width="160" height="60" as="geometry"/>
</mxCell>
<!-- Connectors -->
<mxCell id="6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="3">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="5">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>xml
<mxfile host="app.diagrams.net">
<diagram id="WBS-1" name="Project WBS">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10" guides="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Level 0: Project -->
<mxCell id="2" value="Project Name" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;fontStyle=1;fontSize=14;" vertex="1" parent="1">
<mxGeometry x="280" y="40" width="200" height="80" as="geometry"/>
</mxCell>
<!-- Level 1: Major Deliverables -->
<mxCell id="3" value="Deliverable 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="40" y="160" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="4" value="Deliverable 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="240" y="160" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="5" value="Deliverable 3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="440" y="160" width="160" height="60" as="geometry"/>
</mxCell>
<!-- Connectors -->
<mxCell id="6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="3">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="5">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>RACI Matrix Example
RACI矩阵示例
xml
<mxfile host="app.diagrams.net">
<diagram id="RACI-1" name="RACI Matrix">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10" guides="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Matrix Container -->
<mxCell id="2" value="RACI Matrix" style="swimlane;html=1;startSize=40;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1;fontSize=14;" vertex="1" parent="1">
<mxGeometry x="40" y="40" width="720" height="400" as="geometry"/>
</mxCell>
<!-- Header Row -->
<mxCell id="3" value="Activities / Tasks" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="2">
<mxGeometry x="10" y="50" width="180" height="40" as="geometry"/>
</mxCell>
<mxCell id="4" value="Role A" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="2">
<mxGeometry x="200" y="50" width="120" height="40" as="geometry"/>
</mxCell>
<mxCell id="5" value="Role B" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="2">
<mxGeometry x="330" y="50" width="120" height="40" as="geometry"/>
</mxCell>
<!-- Task Rows with RACI Assignments -->
<mxCell id="6" value="Task 1: Define Requirements" style="rounded=0;whiteSpace=wrap;html=1;align=left;spacingLeft=10;" vertex="1" parent="2">
<mxGeometry x="10" y="100" width="180" height="50" as="geometry"/>
</mxCell>
<mxCell id="7" value="R" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;fontSize=16;" vertex="1" parent="2">
<mxGeometry x="200" y="100" width="120" height="50" as="geometry"/>
</mxCell>
<mxCell id="8" value="A" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;fontSize=16;" vertex="1" parent="2">
<mxGeometry x="330" y="100" width="120" height="50" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>xml
<mxfile host="app.diagrams.net">
<diagram id="RACI-1" name="RACI Matrix">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10" guides="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Matrix Container -->
<mxCell id="2" value="RACI Matrix" style="swimlane;html=1;startSize=40;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1;fontSize=14;" vertex="1" parent="1">
<mxGeometry x="40" y="40" width="720" height="400" as="geometry"/>
</mxCell>
<!-- Header Row -->
<mxCell id="3" value="Activities / Tasks" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="2">
<mxGeometry x="10" y="50" width="180" height="40" as="geometry"/>
</mxCell>
<mxCell id="4" value="Role A" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="2">
<mxGeometry x="200" y="50" width="120" height="40" as="geometry"/>
</mxCell>
<mxCell id="5" value="Role B" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontStyle=1;" vertex="1" parent="2">
<mxGeometry x="330" y="50" width="120" height="40" as="geometry"/>
</mxCell>
<!-- Task Rows with RACI Assignments -->
<mxCell id="6" value="Task 1: Define Requirements" style="rounded=0;whiteSpace=wrap;html=1;align=left;spacingLeft=10;" vertex="1" parent="2">
<mxGeometry x="10" y="100" width="180" height="50" as="geometry"/>
</mxCell>
<mxCell id="7" value="R" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;fontSize=16;" vertex="1" parent="2">
<mxGeometry x="200" y="100" width="120" height="50" as="geometry"/>
</mxCell>
<mxCell id="8" value="A" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;fontSize=16;" vertex="1" parent="2">
<mxGeometry x="330" y="100" width="120" height="50" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>Stakeholder Power-Interest Grid Example
干系人权力-利益网格示例
xml
<mxfile host="app.diagrams.net">
<diagram id="Stakeholder-1" name="Stakeholder Map">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10" guides="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Grid Background -->
<!-- High Power, High Interest -->
<mxCell id="2" value="Manage Closely<br><b>(Key Players)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="400" y="80" width="320" height="280" as="geometry"/>
</mxCell>
<!-- High Power, Low Interest -->
<mxCell id="3" value="Keep Satisfied<br><b>(Keep Informed)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="400" y="360" width="320" height="280" as="geometry"/>
</mxCell>
<!-- Low Power, High Interest -->
<mxCell id="4" value="Keep Informed<br><b>(Show Consideration)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="80" y="80" width="320" height="280" as="geometry"/>
</mxCell>
<!-- Low Power, Low Interest -->
<mxCell id="5" value="Monitor<br><b>(Minimal Effort)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="80" y="360" width="320" height="280" as="geometry"/>
</mxCell>
<!-- Axis Labels -->
<mxCell id="6" value="Interest" style="text;html=1;align=center;verticalAlign=middle;fontSize=14;fontStyle=1;rotation=90;" vertex="1" parent="1">
<mxGeometry x="20" y="320" width="100" height="40" as="geometry"/>
</mxCell>
<mxCell id="7" value="Power / Influence" style="text;html=1;align=center;verticalAlign=middle;fontSize=14;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="350" y="660" width="200" height="40" as="geometry"/>
</mxCell>
<!-- Sample Stakeholders -->
<mxCell id="8" value="CEO" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="520" y="150" width="80" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>xml
<mxfile host="app.diagrams.net">
<diagram id="Stakeholder-1" name="Stakeholder Map">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10" guides="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Grid Background -->
<!-- High Power, High Interest -->
<mxCell id="2" value="Manage Closely<br><b>(Key Players)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="400" y="80" width="320" height="280" as="geometry"/>
</mxCell>
<!-- High Power, Low Interest -->
<mxCell id="3" value="Keep Satisfied<br><b>(Keep Informed)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="400" y="360" width="320" height="280" as="geometry"/>
</mxCell>
<!-- Low Power, High Interest -->
<mxCell id="4" value="Keep Informed<br><b>(Show Consideration)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="80" y="80" width="320" height="280" as="geometry"/>
</mxCell>
<!-- Low Power, Low Interest -->
<mxCell id="5" value="Monitor<br><b>(Minimal Effort)</b>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=12;fontStyle=0;" vertex="1" parent="1">
<mxGeometry x="80" y="360" width="320" height="280" as="geometry"/>
</mxCell>
<!-- Axis Labels -->
<mxCell id="6" value="Interest" style="text;html=1;align=center;verticalAlign=middle;fontSize=14;fontStyle=1;rotation=90;" vertex="1" parent="1">
<mxGeometry x="20" y="320" width="100" height="40" as="geometry"/>
</mxCell>
<mxCell id="7" value="Power / Influence" style="text;html=1;align=center;verticalAlign=middle;fontSize=14;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="350" y="660" width="200" height="40" as="geometry"/>
</mxCell>
<!-- Sample Stakeholders -->
<mxCell id="8" value="CEO" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="520" y="150" width="80" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>Color Schemes
配色方案
Professional Blue Theme (Default)
专业蓝色主题(默认)
- Primary:
fillColor=#dae8fc;strokeColor=#6c8ebf; - Secondary:
fillColor=#b1ddf0;strokeColor=#10739e; - Accent:
fillColor=#f8cecc;strokeColor=#b85450;
- 主色:
fillColor=#dae8fc;strokeColor=#6c8ebf; - 辅助色:
fillColor=#b1ddf0;strokeColor=#10739e; - 强调色:
fillColor=#f8cecc;strokeColor=#b85450;
Green/Natural Theme
绿色自然主题
- Primary:
fillColor=#d5e8d4;strokeColor=#82b366; - Secondary:
fillColor=#fff2cc;strokeColor=#d6b656; - Accent:
fillColor=#e1d5e7;strokeColor=#9673a6;
- 主色:
fillColor=#d5e8d4;strokeColor=#82b366; - 辅助色:
fillColor=#fff2cc;strokeColor=#d6b656; - 强调色:
fillColor=#e1d5e7;strokeColor=#9673a6;
Corporate/Neutral Theme
企业中性主题
- Primary:
fillColor=#f5f5f5;strokeColor=#666666; - Secondary:
fillColor=#e1d5e7;strokeColor=#9673a6; - Highlight:
fillColor=#ffe6cc;strokeColor=#d79b00;
- 主色:
fillColor=#f5f5f5;strokeColor=#666666; - 辅助色:
fillColor=#e1d5e7;strokeColor=#9673a6; - 高亮色:
fillColor=#ffe6cc;strokeColor=#d79b00;
PMP Risk Matrix Colors
PMP风险矩阵配色
- Critical: (Dark Red)
fillColor=#8B0000;strokeColor=#600000;fontColor=#ffffff; - High: (Red)
fillColor=#FF0000;strokeColor=#CC0000;fontColor=#ffffff; - Medium: (Orange)
fillColor=#FFA500;strokeColor=#CC8400;fontColor=#000000; - Low: (Yellow)
fillColor=#FFFF00;strokeColor=#CCCC00;fontColor=#000000; - Very Low: (Light Green)
fillColor=#90EE90;strokeColor=#66AA66;fontColor=#000000;
- 关键风险:(深红色)
fillColor=#8B0000;strokeColor=#600000;fontColor=#ffffff; - 高风险:(红色)
fillColor=#FF0000;strokeColor=#CC0000;fontColor=#ffffff; - 中风险:(橙色)
fillColor=#FFA500;strokeColor=#CC8400;fontColor=#000000; - 低风险:(黄色)
fillColor=#FFFF00;strokeColor=#CCCC00;fontColor=#000000; - 极低风险:(浅绿色)
fillColor=#90EE90;strokeColor=#66AA66;fontColor=#000000;
Connector Styles
连接线样式
Basic Connector
基础连接线
edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;Straight Connector
直线连接线
rounded=0;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;html=1;jettySize=auto;orthogonalLoop=1;Curved Connector
曲线连接线
curved=1;rounded=1;html=1;jettySize=auto;orthogonalLoop=1;curved=1;rounded=1;html=1;jettySize=auto;orthogonalLoop=1;With Arrow
带箭头连接线
edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;endFill=1;edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;endFill=1;Dashed Line (for dependencies)
虚线连接线(用于依赖关系)
edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;dashed=1;dashPattern=5 5;edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;dashed=1;dashPattern=5 5;Thick Line (for critical path)
粗线连接线(用于关键路径)
edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=3;strokeColor=#b85450;edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=3;strokeColor=#b85450;Best Practices
最佳实践
1. Layout Guidelines
1. 布局指南
- Grid alignment: Use x/y coordinates in multiples of 10 for clean alignment
- Standard spacing: 20-30px between shapes, 40-50px between rows
- Shape sizes:
- Small: 80x40
- Medium: 120x60
- Large: 160x80
- Extra Large (Project boxes): 200x80
- Swimlane heights: 120-150px for single row, add 100px per additional row
- WBS spacing: 40px vertical, 20px horizontal between levels
- 网格对齐:x/y坐标使用10的倍数,确保对齐整洁
- 标准间距:图形间间距20-30px,行间距40-50px
- 图形尺寸:
- 小型:80x40
- 中型:120x60
- 大型:160x80
- 超大型(项目框):200x80
- 泳道高度:单行120-150px,每增加一行增加100px
- WBS间距:层级间垂直间距40px,水平间距20px
2. Naming Conventions
2. 命名规范
- Use sequential IDs: "2", "3", "4"...
- Keep shape labels concise (1-5 words)
- Use Title Case for important labels
- Use sentence case for descriptions
- Add ID numbers to WBS packages (e.g., "1.2.3 Task Name")
- 使用连续ID:"2"、"3"、"4"……
- 图形标签简洁(1-5个词)
- 重要标签使用标题大小写
- 描述性内容使用句子大小写
- WBS包添加编号(如"1.2.3 任务名称")
3. Visual Hierarchy
3. 视觉层级
- Start shapes: Use green/light colors
- End shapes: Use red/dark colors
- Decision points: Use orange/yellow
- Regular processes: Use blue/neutral
- Important processes: Use bolder colors or thicker borders
- Critical path: Use red with thick borders (strokeWidth=3)
- 开始图形:使用绿色/浅色
- 结束图形:使用红色/深色
- 决策点:使用橙色/黄色
- 常规流程:使用蓝色/中性色
- 重要流程:使用更鲜艳的颜色或更粗的边框
- 关键路径:使用红色粗边框(strokeWidth=3)
4. PMP/PMBOK Specific
4. PMP/PMBOK专属规范
- WBS Levels: Use progressively lighter shades for deeper levels
- RACI Matrix: Consistently use R=Green, A=Blue, C=Yellow, I=Purple
- Risk Matrix: Follow standard risk color coding (Green to Red)
- Critical Path: Always highlight in red with strokeWidth=3
- Milestones: Use diamond shapes with distinct colors
- WBS层级:层级越深,颜色越浅
- RACI矩阵:统一使用R=绿色、A=蓝色、C=黄色、I=紫色
- 风险矩阵:遵循标准风险配色(从绿色到红色)
- 关键路径:始终用红色粗边框高亮
- 里程碑:使用菱形图形和独特颜色
5. Readability
5. 可读性
- Keep diagrams under 20-25 shapes when possible
- Group related processes in the same swimlane
- Use consistent shape sizes within the same category
- Label all connectors for complex flows
- Add whitespace between dense sections
- Include legends for symbols/colors in complex diagrams
- 图表图形数量尽量控制在20-25个以内
- 相关流程分组到同一泳道
- 同一类别的图形尺寸保持一致
- 复杂流程的所有连接线都添加标签
- 密集区域间保留空白
- 复杂图表添加符号/颜色图例
PMBOK Process Groups & Knowledge Areas Quick Reference
PMBOK过程组与知识领域速查
5 Process Groups
5大过程组
- Initiating: Green colors ()
#d5e8d4 - Planning: Blue colors ()
#dae8fc - Executing: Orange colors ()
#ffe6cc - Monitoring & Controlling: Yellow colors ()
#fff2cc - Closing: Purple colors ()
#e1d5e7
- 启动:绿色系()
#d5e8d4 - 规划:蓝色系()
#dae8fc - 执行:橙色系()
#ffe6cc - 监控与控制:黄色系()
#fff2cc - 收尾:紫色系()
#e1d5e7
10 Knowledge Areas
10大知识领域
- Integration Management: Gray ()
#f5f5f5 - Scope Management: Blue ()
#dae8fc - Schedule Management: Green ()
#d5e8d4 - Cost Management: Orange ()
#ffe6cc - Quality Management: Red ()
#f8cecc - Resource Management: Purple ()
#e1d5e7 - Communications Management: Teal ()
#b1ddf0 - Risk Management: Yellow ()
#fff2cc - Procurement Management: Pink ()
#f8cecc - Stakeholder Management: Light Purple ()
#e1d5e7
- 整合管理:灰色()
#f5f5f5 - 范围管理:蓝色()
#dae8fc - 进度管理:绿色()
#d5e8d4 - 成本管理:橙色()
#ffe6cc - 质量管理:红色()
#f8cecc - 资源管理:紫色()
#e1d5e7 - 沟通管理:蓝绿色()
#b1ddf0 - 风险管理:黄色()
#fff2cc - 采购管理:粉色()
#f8cecc - 干系人管理:浅紫色()
#e1d5e7
Professional Diagram Templates
专业图表模板
Template 1: Cross-Functional Flowchart (Swimlane)
模板1:跨职能流程图(泳道图)
Use Case: Business process across departments
Structure: Horizontal swimlanes, one per department
Key Features: Clear handoffs, decision points, subprocess indicators
适用场景:跨部门业务流程
结构:水平泳道,每个部门对应一个泳道
核心特性:清晰的工作交接、决策点、子流程标识
Template 2: Work Breakdown Structure (WBS)
模板2:工作分解结构(WBS)
Use Case: Project scope decomposition
Structure: Hierarchical tree, 3-4 levels deep
Key Features: Numbered packages (1.1, 1.2, etc.), deliverable-oriented
适用场景:项目范围分解
结构:层级树形结构,3-4层深度
核心特性:带编号的包(1.1、1.2等)、以可交付成果为导向
Template 3: Project Network Diagram (PERT/CPM)
模板3:项目网络图(PERT/CPM)
Use Case: Activity sequencing and critical path analysis
Structure: Activity nodes with duration, early/late start/finish
Key Features: Critical path highlighted, float calculations
适用场景:活动排序与关键路径分析
结构:包含工期、最早/最晚开始/结束时间的活动节点
核心特性:关键路径高亮、浮动时间计算
Template 4: RACI Matrix
模板4:RACI矩阵
Use Case: Role and responsibility assignment
Structure: Grid with tasks (rows) and roles (columns)
Key Features: R, A, C, I assignments with color coding
适用场景:角色与职责分配
结构:任务(行)与角色(列)组成的网格
核心特性:R、A、C、I分配与颜色编码
Template 5: Risk Register Heat Map
模板5:风险登记册热图
Use Case: Visual risk assessment
Structure: 5x5 grid (Probability vs Impact)
Key Features: Color-coded zones, risk items plotted on grid
适用场景:可视化风险评估
结构:5x5网格(概率vs影响)
核心特性:颜色编码区域、风险项标注在网格上
Template 6: Stakeholder Power-Interest Grid
模板6:干系人权力-利益网格
Use Case: Stakeholder analysis and engagement strategy
Structure: 2x2 or 3x3 grid
Key Features: Quadrant labels, stakeholder names plotted
适用场景:干系人分析与参与策略
结构:2x2或3x3网格
核心特性:象限标签、干系人名称标注
Template 7: Organizational Breakdown Structure (OBS)
模板7:组织分解结构(OBS)
Use Case: Project team hierarchy
Structure: Hierarchical tree similar to org chart
Key Features: Names, roles, reporting relationships
适用场景:项目团队层级
结构:类似组织结构图的层级树形结构
核心特性:姓名、角色、汇报关系
Template 8: Resource Histogram
模板8:资源直方图
Use Case: Resource allocation over time
Structure: Bar chart with time on X-axis, resources on Y-axis
Key Features: Color-coded resource types, over-allocation indicators
适用场景:资源随时间分配情况
结构:X轴为时间、Y轴为资源的柱状图
核心特性:颜色编码的资源类型、资源过度分配标识
Error Prevention
错误预防
Common Issues
常见问题
- Overlapping shapes: Ensure x/y coordinates don't overlap
- Missing parents: Swimlane children must reference parent ID
- Invalid IDs: Don't reuse IDs, keep them sequential
- Malformed style strings: Always end with semicolon
- Incorrect connector references: and
sourcemust match existing shape IDstarget - WBS numbering: Ensure hierarchical numbering is consistent (1.0, 1.1, 1.1.1)
- 图形重叠:确保x/y坐标不重叠
- 缺失父节点:泳道子元素必须引用父节点ID
- 无效ID:不要重复使用ID,保持连续
- 样式字符串格式错误:始终以分号结尾
- 连接线引用错误:和
source必须匹配现有图形IDtarget - WBS编号不一致:确保层级编号统一(1.0、1.1、1.1.1)
Validation Checklist
验证清单
- All IDs are unique
- Root cells (0, 1) exist
- All connectors have valid source/target
- Swimlane children have correct parent references
- Coordinates are positive numbers
- Style strings are properly formatted
- XML is well-formed (properly nested tags)
- WBS packages have proper hierarchical numbering
- RACI matrix has all cells filled (no blanks)
- Risk matrix uses standard color coding
- 所有ID唯一
- 存在根单元格(0、1)
- 所有连接线的源/目标有效
- 泳道子元素的父节点引用正确
- 坐标为正数
- 样式字符串格式正确
- XML格式良好(标签嵌套正确)
- WBS包的层级编号统一
- RACI矩阵所有单元格已填充(无空白)
- 风险矩阵使用标准配色
Custom Library Integration
自定义库集成
When creating diagrams that benefit from specific icon libraries, include instructions like:
markdown
undefined当创建的图表可受益于特定图标库时,可添加如下说明:
markdown
undefinedHow to Open with Custom Libraries
如何加载自定义库打开图表
To access additional icons and shapes for this diagram, open it with:
Or manually in draw.io:
- Open the diagram in app.diagrams.net
- File → Open Library from → URL
- Enter: https://jgraph.github.io/drawio-libs/libs/[library-name].xml
undefined要访问本图表的额外图标与图形,请通过以下链接打开:
或在draw.io中手动操作:
- 在app.diagrams.net中打开图表
- 文件 → 从URL打开库
- 输入:https://jgraph.github.io/drawio-libs/libs/[library-name].xml
undefinedOutput Format
输出格式
Always output the complete file with:
.drawio- Proper XML declaration (optional but recommended)
- Complete mxfile structure
- All necessary root cells
- Properly formatted and indented for readability
- Save with or
.drawioextension.xml - Include usage instructions if custom libraries are beneficial
始终输出完整的文件,包含:
.drawio- 正确的XML声明(可选但推荐)
- 完整的mxfile结构
- 所有必要的根单元格
- 格式规范且缩进清晰,便于阅读
- 保存为或
.drawio扩展名.xml - 若使用自定义库,需包含使用说明
Tips for Excellence
卓越技巧
- Ask clarifying questions if the process/project isn't clear
- Suggest improvements to workflows if you spot issues
- Use appropriate shapes for different process types and PM artifacts
- Maintain consistency in sizing, spacing, and color schemes
- Consider the audience - executives need less detail than implementers
- Test the flow logic - ensure all paths lead somewhere
- Add legends if using multiple shape types or colors
- Include PMBOK process group identifiers when relevant
- Reference custom libraries that would enhance the diagram
- Provide opening instructions if special libraries are needed
- 若流程/项目不清晰,提出澄清问题
- 若发现问题,建议优化工作流
- 针对不同流程类型和PM工件使用合适的图形
- 保持尺寸、间距和配色方案的一致性
- 考虑受众:高管需要的细节少于实施人员
- 测试流程逻辑:确保所有路径都有明确走向
- 若使用多种图形类型或颜色,添加图例
- 相关时标注PMBOK过程组
- 引用可增强图表的自定义库
- 若需要特殊库,提供打开说明
Professional Templates Library
专业模板库
The following template patterns can be adapted for various use cases:
- Agile/Scrum Diagrams: Sprint planning, retrospectives, burndown charts
- DevOps Pipelines: CI/CD flows with stages, gates, and tools
- Business Model Canvas: 9-box strategic planning tool
- Value Stream Mapping: Lean process analysis with cycle times
- SIPOC Diagrams: Supplier-Input-Process-Output-Customer
- Fishbone/Ishikawa: Root cause analysis
- Affinity Diagrams: Idea clustering and organization
- Decision Trees: Multi-level decision analysis
- Use Case Diagrams: UML user-system interactions
- Data Flow Diagrams: Information flow analysis
以下模板模式可适配多种场景:
- 敏捷/Scrum图表: sprint规划、回顾会、燃尽图
- DevOps流水线:包含阶段、闸门和工具的CI/CD流程
- 商业模式画布:9格战略规划工具
- 价值流映射:包含周期时间的精益流程分析
- SIPOC图:供应商-输入-流程-输出-客户
- 鱼骨图/石川图:根本原因分析
- 亲和图:想法聚类与整理
- 决策树:多级决策分析
- 用例图:UML用户-系统交互图
- 数据流图:信息流分析
Resources
资源
- Official draw.io documentation: https://www.drawio.com/doc/
- Example diagrams: https://www.drawio.com/example-diagrams
- Custom libraries repository: https://github.com/jgraph/drawio-libs
- Template library: Available in draw.io via Arrange > Insert > Template
- Shape libraries: Enable via "More Shapes" in draw.io
- PMBOK Guide (6th & 7th Edition): PMI official documentation
- Project Management Institute: https://www.pmi.org/
- draw.io官方文档:https://www.drawio.com/doc/
- 示例图表:https://www.drawio.com/example-diagrams
- 自定义库仓库:https://github.com/jgraph/drawio-libs
- 模板库:在draw.io中通过「排列 > 插入 > 模板」访问
- 图形库:在draw.io中通过「更多图形」启用
- PMBOK指南(第6、7版):PMI官方文档
- 项目管理协会:https://www.pmi.org/
Limitations
局限性
- Complex custom shapes may require manual adjustment
- Some advanced features (layers, pages) may need manual setup
- 3D shapes and advanced styling might not be fully represented
- Custom library icons require internet connection to load
- Very large WBS structures may need to be split across pages
- Always recommend testing the generated file in draw.io
Remember: The goal is to create diagrams that are immediately usable, professional-looking, accurately represent the user's process or system, and follow PMP/PMBOK best practices when applicable!
- 复杂自定义图形可能需要手动调整
- 部分高级功能(图层、页面)可能需要手动设置
- 3D图形和高级样式可能无法完全呈现
- 自定义库图标需要联网加载
- 大型WBS结构可能需要拆分到多个页面
- 始终建议在draw.io中测试生成的文件
请记住:我们的目标是创建可直接使用、专业美观、准确呈现用户流程或系统的图表,并在适用时遵循PMP/PMBOK最佳实践!