我正在尝试使用plantuml组件图构建“硬件架构”图,我正在努力布局。
我的图表变得越来越复杂,我注意到工厂继续从左到右添加框架,使图形水平增长。
从此代码中获取
@startuml
' -----------------------------------------------------
skinparam defaultTextAlignment center
' -----------------------------------------------------
top to bottom direction
frame Pippo as pippo {
frame "Pippo Deploy" {
node "xxx1\nfoo" <<windows 7>>
}
frame "Pippo Core" {
node "===xxx2\nbar" <<amiga>>
node "===xxx2\nbar" <<amiga>>
node "===xxx3\nbar" <<amiga>>
node "===xxx4\nbar" <<amiga>>
node "===xxx5\nbar" <<amiga>>
node "===xxx6\nbar" <<amiga>>
node "===xxx7\nbar" <<amiga>>
}
frame "Pippo Additional Servers" {
node "===xxx8\nfoo" <<windows 7>>
node "===xxx9\nfoo" <<windows 7>>
node "===xxx10\nfoo" <<windows 7>>
node "===xxx11\nfoo" <<windows 7>>
node "===xxx12\nfoo" <<windows 7>>
node "===xxx13\nbar" <<amiga>>
}
frame "Pippo other" {
node "===xxx14\nfoo" <<windows server 2003>>
}
}
frame "Pluto" as pluto {
frame "Pluto 1" {
node "===xxx15\nfoo" <<windows server 2012>>
node "===xxx16\nfoo" <<windows 7>>
node "===xxx17\nbar" <<amiga>>
}
frame "Pluto 2" {
node "===xxx18\nfoo" <<windows server 2003>>
node "===xxx19\nfoo" <<windows 7>>
node "===xxx20\nfoo" <<windows 7>>
}
}
pippo --[hidden]> pluto
@enduml
我希望在“Pippo”框架下设置“Pluto”框架
看到我已经使用了隐藏链接和top to bottom direction
,试图强制进行这种布局,但没有结果。
答案 0 :(得分:2)
这如何:
将top to bottom direction
替换为left to right direction
并注释pippo --[hidden]> pluto
可以得到以下信息:
完整代码:
@startuml
' -----------------------------------------------------
skinparam defaultTextAlignment center
' -----------------------------------------------------
'top to bottom direction
left to right direction
frame Pippo as pippo {
frame "Pippo Deploy" {
node "xxx1\nfoo" <<windows 7>>
}
frame "Pippo Core" {
node "===xxx2\nbar" <<amiga>>
node "===xxx2\nbar" <<amiga>>
node "===xxx3\nbar" <<amiga>>
node "===xxx4\nbar" <<amiga>>
node "===xxx5\nbar" <<amiga>>
node "===xxx6\nbar" <<amiga>>
node "===xxx7\nbar" <<amiga>>
}
frame "Pippo Additional Servers" {
node "===xxx8\nfoo" <<windows 7>>
node "===xxx9\nfoo" <<windows 7>>
node "===xxx10\nfoo" <<windows 7>>
node "===xxx11\nfoo" <<windows 7>>
node "===xxx12\nfoo" <<windows 7>>
node "===xxx13\nbar" <<amiga>>
}
frame "Pippo other" {
node "===xxx14\nfoo" <<windows server 2003>>
}
}
frame "Pluto" as pluto {
frame "Pluto 1" {
node "===xxx15\nfoo" <<windows server 2012>>
node "===xxx16\nfoo" <<windows 7>>
node "===xxx17\nbar" <<amiga>>
}
frame "Pluto 2" {
node "===xxx18\nfoo" <<windows server 2003>>
node "===xxx19\nfoo" <<windows 7>>
node "===xxx20\nfoo" <<windows 7>>
}
}
'pippo --[hidden]> pluto
@enduml