问题描述
我实际上正在尝试使用PlantUml
生成组件图.是否可以定义不同组件的相对位置?我要定义的是:ComponentB离开了ComponentA. ComponentC低于ComponentA,...
I'm actually trying to generate a component diagram with PlantUml
. Is it possible to define the relative position of the different components? What I want to define is: ComponentB is left from ComponentA. ComponentC is below ComponentA, ...
推荐答案
一种典型的方法是将一行标记为隐藏.
A typical approach is to mark a line as hidden.
要记住的一件事是,hidden
仅支持从左到右的->
和从上到下的-->
行,因此您需要相应地放置左侧和右侧(似乎不支持语法X <[hidden]- Y
.
One thing to keep in mind is that hidden
is only supported for left-to-right ->
, and top-to-bottom -->
lines, so you need to place the left and right side accordingly (syntax X <[hidden]- Y
doesn't seem to be supported).
@startuml
class ComponentA
ComponentB -[hidden]> ComponentA
ComponentA -[hidden]-> ComponentC
@enduml
另请参见如何更正PlantUML线路径更多定位技巧.
See also How to correct PlantUML Line Path for more positioning tips.
这篇关于PlantUml定义组件的相对位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!