Comments (4)
Hi @Oleg3n,
did you read https://github.com/plantuml-stdlib/C4-PlantUML/blob/master/LayoutOptions.md#layout-guidance-and-practices ?
I think you have a sample which is not perfect rendered, but I think if you remove the Lay_D(ms1, ms2)
it produces a better (your expected?) result.
BR Helmut
from c4-plantuml.
Hi Helmut
Thank you for the quick reply. Yes, I did read. Do you mean I break some rule? Or that I should have understood that drawing results are not predictable? :)
Your trick is working for this minimal working test. What I initially tried to build is a diagram similar to this but vertically mirrored (DBs on the right, Externals on the left):
and the best result I was able to achieve is this:
So I am trying to understand if I am doing something wrong or is it 'expected behavior'.
Code for the first image
@startuml C4_test3
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
System_Boundary(connectors, "Connectors") {
Container(sink1, "Sink 1", "Sink connector")
Container(sink2, "Sink 2", "Sink connector")
}
System_Ext(ext1, "External 1", "External System")
System_Ext(ext2, "External 2", "External System")
ContainerQueue(kafka, "Kafka")
System_Boundary(feature1, "Feature 1") {
Container(ms1, "Component 1", "Feature")
ContainerDb(db1, "DB")
}
System_Boundary(feature2, "Feature 2") {
Container(ms2, "Component 2", "Feature")
ContainerDb(db2, "DB")
}
System_Boundary(feature3, "Feature 3") {
Container(ms3, "Component 3", "Feature")
ContainerDb(db3, "DB")
}
Lay_D(sink1, sink2)
Lay_D(ms1, ms2)
Lay_D(ms1, ms2)
Lay_D(ms2, ms3)
Lay_D(ms2, ms3)
Rel_L(sink1, ext1, "Publish")
Rel_L(sink2, ext2, "Publish")
Rel(sink1, kafka, "Consume")
Rel_R(sink2, kafka, "Consume")
Rel(ms1, kafka, "Publish")
Rel_L(ms2, kafka, "Publish")
Rel(ms3, kafka, "Publish")
Rel_L(ms1, db1, "Persist")
Rel_L(ms2, db2, "Persist")
Rel_L(ms3, db3, "Persist")
@enduml
Code for the second image.
The only difference from the first is _R replaced with _L and vice versa.
@startuml C4_test1
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
System_Boundary(connectors, "Connectors") {
Container(sink1, "Sink 1", "Sink connector")
Container(sink2, "Sink 2", "Sink connector")
}
System_Ext(ext1, "External 1", "External System")
System_Ext(ext2, "External 2", "External System")
ContainerQueue(kafka, "Kafka")
System_Boundary(feature1, "Feature 1") {
Container(ms1, "Component 1", "Feature")
ContainerDb(db1, "DB")
}
System_Boundary(feature2, "Feature 2") {
Container(ms2, "Component 2", "Feature")
ContainerDb(db2, "DB")
}
System_Boundary(feature3, "Feature 3") {
Container(ms3, "Component 3", "Feature")
ContainerDb(db3, "DB")
}
Lay_D(sink1, sink2)
Lay_D(ms1, ms2)
Lay_D(ms1, ms2)
Lay_D(ms2, ms3)
Lay_D(ms2, ms3)
Rel_R(sink1, ext1, "Publish")
Rel_R(sink2, ext2, "Publish")
Rel(sink1, kafka, "Consume")
Rel_L(sink2, kafka, "Consume")
Rel(ms1, kafka, "Publish")
Rel_R(ms2, kafka, "Publish")
Rel(ms3, kafka, "Publish")
Rel_R(ms1, db1, "Persist")
Rel_R(ms2, db2, "Persist")
Rel_R(ms3, db3, "Persist")
@enduml
from c4-plantuml.
Hi @Oleg3n,
I fear it is basically the "expected" behavior and I have no better rules.
I tried it with a different LAYOUT_LANDSCAPE(), changed the order of definitions, moved internal relations into the system boundaries, removed some double defined LAY_D() calls (and used feature1 instead of ms1, because I think the layout of the outside boundaries could be better(?)) and got something like this.
BR Helmut
from c4-plantuml.
Thank you, Helmut. This is really helpful. This unpredictability for _L and _R makes me crazy but this is good news that eventually it should be possible to achieve the desired result.
I appreciate your help and effort.
All the very best in this New year
Oleg
from c4-plantuml.
Related Issues (20)
- Tags and sprites conflict in Rel (update: sprites have white background, should be transparent) HOT 4
- Image gets cut on the side HOT 1
- Adjust thickness of element border HOT 6
- C4_Dynamic no longer numbers all relationships HOT 6
- error a001 on all diagrams HOT 2
- Odd Legend Rendering for Sequence Diagrams HOT 5
- Question: How do I split functions over multiple lines? HOT 1
- AddNodeTag in C4_Deployment throws an error HOT 5
- Support of "all" PlantUML elements can be enabled HOT 4
- Line styling not recognized when using ELK HOT 2
- "Cannot open URL" on Online Server HOT 2
- Legend text includes unexpected properties (e.g. $lineStyle) HOT 3
- Wrong layout: "== Base Query" <<boundary>> as Base Query HOT 3
- C4_Container diagram not rendering properly HOT 3
- Java OutOfMemoryError with some Sequence diagrams HOT 6
- $baseShape="label" does not use the correct color (size, ...?) in combination with themes
- Descriptions for boundaries HOT 8
- Separating model and view HOT 5
- Single column properties or header lead to rendering error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c4-plantuml.