2016-07-21 6 views
0

以下のようなドット言語を使用してパッケージダイアグラムを作成します。 「クラスター」を使用して要素をネストすることは可能ですが、外側のパッケージのタブ領域にラベルを入れることができるかどうかは不明です。 可能であれば教えてください。GraphVizを使用して複雑なパッケージダイアグラムを作成

UML package diagram

答えて

2

残念ながらタブ形状(左上隅に耳を持つもの)がラベルの指定をサポートしていません。

あなたは、あなたが通常の長方形またはレコード形状

digraph diagram { 
    compound=true; 
    ranksep=1 
    node[shape=record] 

    subgraph cluster_all { 
     label="Multi-Layered Application" 
     Users [shape=tab] 

     subgraph cluster_presentation { 
      label="Presentation Layer" 
      "User Interface" [shape=tab] 
      "Presentation Logic" [shape=tab] 
     } 

     Users -> "User Interface" [lhead=cluster_presentation] 

     subgraph cluster_business { 
      label="Business Layer" 
      node[shape=tab] 
      "Application Facade" 
     } 

     "User Interface" -> "Application Facade" [lhead=cluster_business,ltail=cluster_presentation,style=dashed] 
    } 

} 

enter image description here

しかし、あなたが見ることができるように使用することができることを犠牲にしている場合は、graphvizのは、このために正確に非常に適していませんあなたは多くの低レベルの手抜きをする必要があります。

また、ダイアグラムにテキストを記述することが目的の場合は、plantuml.comを強くお勧めします。答えを

@startuml 
package "<<model>> Multi-Layered Application <<model>>" as app { 
    package Users { } 

    package "Presentation Layer" as presentation { 
    package "User Interface" { } 
    package "Presentation Logic" { } 
    } 

    Users ..> presentation 

    package "Business Layer" { 
    package "Application Facade" { } 
    } 

    presentation ..> "Business Layer" 

} 
@enduml 

enter image description here

+0

おかげplantumlは私のためのオプションではありませんように、私は耳レスのアプローチのために行くだろう。 – Jaime

関連する問題