@@ -30,7 +30,7 @@ C4-PlantUML includes macros, stereotypes, and other goodies (like VSCode Snippet
30
30
- [ Including the C4-PlantUML library] ( #including-the-c4-plantuml-library )
31
31
- [ Now let's create a C4 Container diagram] ( #now-lets-create-a-c4-container-diagram )
32
32
- [ Supported Diagram Types] ( #supported-diagram-types )
33
- - [ System Context & System Landscape diagrams] ( #system-context--system-landscape-diagrams )
33
+ - [ System Context \ & System Landscape diagrams] ( #system-context--system-landscape-diagrams )
34
34
- [ Container diagram] ( #container-diagram )
35
35
- [ Component diagram] ( #component-diagram )
36
36
- [ Dynamic diagram] ( #dynamic-diagram )
@@ -39,11 +39,13 @@ C4-PlantUML includes macros, stereotypes, and other goodies (like VSCode Snippet
39
39
- [ Samples] ( #samples )
40
40
- [ Relationship Types] ( #relationship-types )
41
41
- [ Layout (arrange) elements (without relationships)] ( #layout-arrange-elements-without-relationships )
42
+ - [ Compatibility mode ` NO_LAY_ROTATE=1 ` ] ( #compatibility-mode-no_lay_rotate1 )
42
43
- [ Global Layout Options] ( #global-layout-options )
43
44
- [ Sprites and other images] ( #sprites-and-other-images )
44
45
- [ Custom tags/stereotypes support and skinparam updates] ( #custom-tagsstereotypes-support-and-skinparam-updates )
45
46
- [ Element specific tag definitions] ( #element-specific-tag-definitions )
46
47
- [ Boundary specific tag definitions] ( #boundary-specific-tag-definitions )
48
+ - [ Define a new legend title] ( #define-a-new-legend-title )
47
49
- [ Comments] ( #comments )
48
50
- [ Sample with different tag combinations] ( #sample-with-different-tag-combinations )
49
51
- [ Sample with tag dependent sprites and custom legend text] ( #sample-with-tag-dependent-sprites-and-custom-legend-text )
@@ -59,13 +61,20 @@ C4-PlantUML includes macros, stereotypes, and other goodies (like VSCode Snippet
59
61
- [ Advanced Samples] ( #advanced-samples )
60
62
- [ techtribes.js] ( #techtribesjs )
61
63
- [ Message Bus and Microservices] ( #message-bus-and-microservices )
64
+ - [ (C4 styled) Sequence diagram sample] ( #c4-styled-sequence-diagram-sample )
62
65
- [ Background] ( #background )
63
66
- [ License] ( #license )
64
67
- [ 📄 Layout Options] ( LayoutOptions.md#layout-options )
65
68
- [ 📄 Themes (different styles and languages)] ( Themes.md#themes )
66
69
- samples
67
70
- [ 📄 C4 Model Diagrams] ( samples/C4CoreDiagrams.md#c4-model-diagrams )
68
71
72
+ > [ !IMPORTANT]
73
+ > ** PlantUML v2.12.0:** Layout could be changed based on bugfix.
74
+ If ` LAYOUT_LANDSCAPE() ` is combined with ` Lay_*() ` calls then the elements are correct positioned based on the new implementation.
75
+ The old implementation swapped up<->left and down<->right (details see [ issue 376] ( https://github.com/plantuml-stdlib/C4-PlantUML/issues/376 ) ).
76
+ The old behavior can be re-activated with ` !NO_LAY_ROTATE=1 ` . Details see [ Compatibility mode ` NO_LAY_ROTATE=1 ` ] ( #compatibility-mode-no_lay_rotate1 ) .
77
+
69
78
## Getting Started
70
79
71
80
### Including the C4-PlantUML library
@@ -464,6 +473,66 @@ Lay_Distance(LEGEND(), db, 1)
464
473
465
474
![ db below legend, 1 unit distance] ( https://www.plantuml.com/plantuml/png/hL5DZzem4BtdLtXH3o0jH5NRIwLAYu3THUA30bkEqH0FuCgnKyy4r7_VCIIxKQjAFVGKvptFUtvl7eWXS5NOvCwut5OQrOcvfCzf6k0oE1e-LVkACEJUCJeUvBv8ImikplI9jJNxTFInluhGotoM5a2CGQ1i91DW78P16VMJEuq7-LNZoRVfQBdO_8CHLoNeyE7Dq0ZRFyYDFfN1C5BZf_4SENfrULmkjiFTPBESJ_whqHM32v8liF-fQUqjLGhkM5ceG_z9VuSp_8qhw8VD2CCPVnjlfqdZswdkT2L7xxeHkbUTKKNi2mmTEQ_GbnOLdu2LGzIg35vNEPEGxswPldIkKfrUyhggBfKWmvlLC6hKKU9nUq9Lo1Lb76CuG5vBi-1vRNlZG3pKHLfk6pLARIieZGWFLzEe7sk9tsTmsY8fi5R9bkGYaRB-QFAsNBpTrXhlktelqsDWs0DXL9gRF7Zo1rQRhxEhjBUQcXhkbGyQWn8xUVRPcnpbU_2X03RUjSrQMn7FP8ssxllMrGiX2HxXAn1ZjT5iVKjwVU0QGLEwYyAHJZRFortsE5iEjzF5KpQRF4qMusulcS7FR6o8mUNORT2RnFjUye1Eo_P_0G00 " db below legend, 1 unit distance ")
466
475
476
+ ### Compatibility mode ` NO_LAY_ROTATE=1 `
477
+
478
+ Based on the bugfix of [ issue 376] ( https://github.com/plantuml-stdlib/C4-PlantUML/issues/376 )
479
+ the layout of old diagrams could be changed if they contain a combination of
480
+ ` LAYOUT_LANDSCAPE() ` and ` Lay_*() ` commands like below.
481
+
482
+ ``` plantuml
483
+ @startuml
484
+ !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
485
+ LAYOUT_LANDSCAPE()
486
+
487
+ Person(a, "A")
488
+ System(sUp, "B up\nbefore bugfix left")
489
+ System(sRight, "C right\nbefore bugfix down")
490
+ System(sDown, "D down\nbefore bugfix right")
491
+ System(sLeft, "E left\nbefore bugfix up")
492
+
493
+ Lay_U(a, sUp)
494
+ Lay_R(a, sRight)
495
+ Lay_D(a, sDown)
496
+ Lay_L(a, sLeft)
497
+
498
+ HIDE_STEREOTYPE()
499
+ @enduml
500
+ ```
501
+
502
+ ![ bugfix changes old layout] ( https://www.plantuml.com/plantuml/png/NP3FQeGm6CJlFaMw9uMkNdhgQQqABQHTySzXeI1HemPY3CaNjllsJR8NyPOPVZFVa8i6ei2iF7XXOk1cf6W1aFezIHIvnpE3nVH6KpLi0gY0UDZMH78YNEQiOUIiJxAtS-cizXidAz50bRMwp2O84rJ5qlNZz7PjcmwdFtcTfMKHHa5GKgKt4P9NT4fFKL0_R7ODTIkjyO6C_1KzdJP5KM_cYVqXJYVOSHMR5x1eXfHx7UbnkuiTdLjfuTpxHzONx61C9zTS-9D7s4XB1fWykjPjjtiZhogl_AgdaJl37tvgxBJljldFhxpewgQeYcjpy_zneM8qA_y7 " bugfix changes old layout ")
503
+
504
+ The new repositioning of the elements could damage old diagrams.
505
+ Therefore a compatibility mode NO_LAY_ROTATE is introduced.
506
+ This mode can be directly activated in the old diagrams with ` !NO_LAY_ROTATE=1 `
507
+ or with the additional command line argument ` -DNO_LAY_ROTATE=1 ` (like ` java -jar plantuml.jar -DNO_LAY_ROTATE=1 ... ` )
508
+
509
+ If this value is set then non of the Lay_ * () calls itself has to be updated like below.
510
+
511
+ ``` plantuml
512
+ @startuml
513
+ ' the bugfix is deactivated with following statement
514
+ !NO_LAY_ROTATE = 1
515
+
516
+ !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
517
+ LAYOUT_LANDSCAPE()
518
+
519
+ Person(a, "A")
520
+ System(sUp, "B up\nbefore bugfix left")
521
+ System(sRight, "C right\nbefore bugfix down")
522
+ System(sDown, "D down\nbefore bugfix right")
523
+ System(sLeft, "E left\nbefore bugfix up")
524
+
525
+ Lay_U(a, sUp)
526
+ Lay_R(a, sRight)
527
+ Lay_D(a, sDown)
528
+ Lay_L(a, sLeft)
529
+
530
+ HIDE_STEREOTYPE()
531
+ @enduml
532
+ ```
533
+
534
+ ![ deactivated bugfix reproduces old layout] ( https://www.plantuml.com/plantuml/png/NP1HQxim5CNVyobk-_9luT_AO4-3GPqA6xXQh3uK1X8rQa2Z93Tp_VQxfZ1Att8EltFFpJqOv1hjqBD_0DW9A6tRo1-G1ch1AvJV74KDiyGEch7lnrcg5WoIEmY5R7LCYjY_56cI-La4h_34s4ggghUrW0vnCY-Uf_cyRsc2BQqHkXeLKdHVZOCtzLmjxJk3TIzBBtZUdHOh_uozWHiKcgmYe0INIkZzH2oZlYJFgFOOdWF_56ssZ9s4DgFQyF-mzjTRThvITjYOV2BZ3UpqfKhHZFhlVxrey8vBPTiXeG7evVL8r-EixkYG9C6XynzPD-0EZgc9uCXLFi9s8fB5_5hao-wqxzQfr2ctrSq8dR4KttIyQ3URykyVOLISioYDakpYxd4GggPJ_G80 " deactivated bugfix reproduces old layout ")
535
+
467
536
## Global Layout Options
468
537
469
538
C4-PlantUML also comes with some layout options to make it easy and reusable to create nice and useful diagrams:
@@ -1006,7 +1075,7 @@ Source: [C4_Container Diagram Sample - message bus.puml](samples/C4_Container%20
1006
1075
1007
1076

1008
1077
1009
- ### (C4 styled) Sequence diagram
1078
+ ### (C4 styled) Sequence diagram sample
1010
1079
1011
1080
TODO: better sample is missing ...
1012
1081
0 commit comments