如何使用 Mermaid FlowChart 使节点走到底部
我正在用 Mermaid 绘制流程图,但它没有按我想要的方式工作。
这是我的代码:
flowchart TD
a0[["xml_parsing"]]
a1{{"result = []"}}
a2{"any elements in collection?"}
a3{{"container = next element"}}
a4{{"name = text of SHORT-NAME tag of container"}}
a5{"is name end with '_PIM'?"}
a6{{"size = text of NvMNvBlockLength tag of container"}}
a7{{"append [container, name, size] to result"}}
ed([return result])
a0-->a1-->a2-->|YES|a3-->a4-->a5-->|NO|a2
a5-->|YES|a6-->a7-->a2-->|NO|ed
这是结果:
我想让返回结果
节点转到底部。
I'm drawing a flowchart with Mermaid but it isn't working the way I want.
Here is my code:
flowchart TD
a0[["xml_parsing"]]
a1{{"result = []"}}
a2{"any elements in collection?"}
a3{{"container = next element"}}
a4{{"name = text of SHORT-NAME tag of container"}}
a5{"is name end with '_PIM'?"}
a6{{"size = text of NvMNvBlockLength tag of container"}}
a7{{"append [container, name, size] to result"}}
ed([return result])
a0-->a1-->a2-->|YES|a3-->a4-->a5-->|NO|a2
a5-->|YES|a6-->a7-->a2-->|NO|ed
and this is result:
I want to make the return result
node go to the bottom.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以告诉 Mermaid 特定链接应该具有特定的 最小长度:
在这里,我在从
a2
到ed
的链接中添加了四个额外的-
,因此ed
节点是与a7
节点对齐。如果您希望它更低,只需添加另一个-
即可。You can tell Mermaid that a particular link should have a certain minimum length:
Here, I've added four extra
-
s in the link froma2
toed
so theed
node is aligned with thea7
node. If you want it to be even lower, just add another-
.