【发布时间】:2020-05-31 09:44:55
【问题描述】:
我正在使用 Graphviz 自动创建架构图。我有以下两个问题,希望得到帮助。
- 我正在使用 UUID 来唯一标识一个组件(例如:
"a5320de8-a320-11ea-bb37-0242ac130002" [label="Component A"])。映射 A -> B 时,我会得到“组件 A”-> b0c5e47c。这很奇怪。我能够将 UUID 映射到 UUID 的唯一方法是在它们周围加上引号。有什么建议么? - 我想以特定方式和特定方向对齐集群。我已经尝试过
{rank=same; cluster_B, cluster_C, cluster_D};和"9653369c-a322-11ea-bb37-0242ac130002" -> "aa31adb9-9621-40c2-855c-621832dd8c61" [style=invis]但都不起作用。
我的点文件中有三个部分,它们是:
- 组件(在本节中,我列出了所有 100 多个组件并根据特定规则对它们进行颜色编码。
- 集群(在本节中,我将组件集群到特定的“分组”中)
- 图表或映射(在本节中,我将映射不同的组件和集群)。
这是我的 DOT 文件的示例。
digraph architecture {
#graph [rankdir=LR]
compound=true;
#Compliant
node[fillcolor="#013220" style="filled" shape=square fontcolor="white"];
"a5320de8-a320-11ea-bb37-0242ac130002" [label="Component A"]
"b0c5e47c-a320-11ea-bb37-0242ac130002" [label="Component B"]
#Clusters
#Customer-facing client application cluster
subgraph cluster_A{
label="Client Apps";
"f7b3915d-6b3d-4d4c-bef0-bdabda915c03";
"9912de2b-739a-4c5c-834e-e0c3d09d70d1";
"16bb2066-9293-470e-99ec-c59d8426c0ab";
"641a6601-f4f6-4c06-baa6-e5e232f8abed";
"c5e92b09-a470-4fb6-af5c-e5f7dbeff919";
}
#Diagrams
"f7b3915d-6b3d-4d4c-bef0-bdabda915c03" -> {"35305026-d285-458c-85ad-7eae4e785e84", "76e0e679-42a6-47f0-9164-abc223da07fe"};
76e0e679-42a6-47f0-9164-abc223da07fe" -> "35305026-d285-458c-85ad-7eae4e785108";
}
【问题讨论】:
标签: graphviz