-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
/
defaultConfig.js
1078 lines (984 loc) · 41.6 KB
/
defaultConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import theme from './themes';
/**
* **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click
* here](8.6.0_docs.md)].**
*
* ## **What follows are config instructions for older versions**
*
* These are the default options which can be overridden with the initialization call like so:
*
* **Example 1:**<pre> mermaid.initialize({ flowchart:{ htmlLabels: false } }); </pre>
*
* **Example 2:**<pre> <script> var config = { startOnLoad:true, flowchart:{ useMaxWidth:true,
* htmlLabels:true, curve:'cardinal', },
*
* securityLevel:'loose',
*
* }; mermaid.initialize(config); </script> </pre>
*
* A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults).
* A description of each option follows below.
*
* @name Configuration
*/
const config = {
/**
* Theme , the CSS style sheet
*
* | Parameter | Description | Type | Required | Values |
* | --------- | --------------- | ------ | -------- | ---------------------------------------------- |
* | theme | Built in Themes | string | Optional | 'default', 'forest', 'dark', 'neutral', 'null' |
*
* **Notes:** To disable any pre-defined mermaid theme, use "null".<pre> "theme": "forest",
* "themeCSS": ".node rect { fill: red; }" </pre>
*/
theme: 'default',
themeVariables: theme['default'].getThemeVariables(),
themeCSS: undefined,
/* **maxTextSize** - The maximum allowed size of the users text diagram */
maxTextSize: 50000,
darkMode: false,
/**
* | Parameter | Description | Type | Required | Values |
* | ---------- | ------------------------------------------------------ | ------ | -------- | --------------------------- |
* | fontFamily | specifies the font to be used in the rendered diagrams | string | Required | Any Possible CSS FontFamily |
*
* **Notes:** Default value: '"trebuchet ms", verdana, arial, sans-serif;'.
*/
fontFamily: '"trebuchet ms", verdana, arial, sans-serif;',
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ----------------------------------------------------- | ---------------- | -------- | ------------- |
* | logLevel | This option decides the amount of logging to be used. | string \| number | Required | 1, 2, 3, 4, 5 |
*
* **Notes:**
*
* - Debug: 1
* - Info: 2
* - Warn: 3
* - Error: 4
* - Fatal: 5 (default)
*/
logLevel: 5,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | --------------------------------- | ------ | -------- | ------------------------------- |
* | securitylevel | Level of trust for parsed diagram | string | Required | 'strict', 'loose', 'antiscript' |
*
* **Notes**:
*
* - **strict**: (**default**) tags in text are encoded, click functionality is disabled
* - **loose**: tags in text are allowed, click functionality is enabled
* - **antiscript**: html tags in text are allowed, (only script element is removed), click
* functionality is enabled
*/
securityLevel: 'strict',
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | -------------------------------------------- | ------- | -------- | ----------- |
* | startOnLoad | Dictates whether mermaid starts on Page load | boolean | Required | true, false |
*
* **Notes:** Default value: true
*/
startOnLoad: true,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------------- | ---------------------------------------------------------------------------- | ------- | -------- | ----------- |
* | arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | boolean | Required | true, false |
*
* **Notes**:
*
* This matters if you are using base tag settings.
*
* Default value: false
*/
arrowMarkerAbsolute: false,
/**
* This option controls which currentConfig keys are considered _secure_ and can only be changed
* via call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to the
* `secure` keys in the current currentConfig. This prevents malicious graph directives from
* overriding a site's default security.
*
* **Notes**:
*
* Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']
*/
secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],
/**
* This option controls if the generated ids of nodes in the SVG are generated randomly or based
* on a seed. If set to false, the IDs are generated based on the current date and thus are not
* deterministic. This is the default behaviour.
*
* **Notes**:
*
* This matters if your files are checked into sourcecontrol e.g. git and should not change unless
* content is changed.
*
* Default value: false
*/
deterministicIds: false,
/**
* This option is the optional seed for deterministic ids. if set to undefined but
* deterministicIds is true, a simple number iterator is used. You can set this attribute to base
* the seed on a static string.
*/
deterministicIDSeed: undefined,
/** The object containing configurations specific for flowcharts */
flowchart: {
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | ----------------------------------------------- | ------- | -------- | ------------------ |
* | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |
*
* **Notes:**
*
* The amount of padding around the diagram as a whole so that embedded diagrams have margins,
* expressed in pixels
*
* Default value: 8
*/
diagramPadding: 8,
/**
* | Parameter | Description | Type | Required | Values |
* | ---------- | -------------------------------------------------------------------------------------------- | ------- | -------- | ----------- |
* | htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | boolean | Required | true, false |
*
* **Notes:** Default value: true.
*/
htmlLabels: true,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | --------------------------------------------------- | ------- | -------- | ------------------- |
* | nodeSpacing | Defines the spacing between nodes on the same level | Integer | Required | Any positive Number |
*
* **Notes:**
*
* Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the
* vertical spacing for LR as well as RL graphs.**
*
* Default value: 50
*/
nodeSpacing: 50,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------------------------------------------------- | ------- | -------- | ------------------- |
* | rankSpacing | Defines the spacing between nodes on different levels | Integer | Required | Any Positive Number |
*
* **Notes**:
*
* Pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal
* spacing for LR as well as RL graphs.
*
* Default value 50
*/
rankSpacing: 50,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | -------------------------------------------------- | ------ | -------- | ----------------------------- |
* | curve | Defines how mermaid renders curves for flowcharts. | string | Required | 'basis', 'linear', 'cardinal' |
*
* **Notes:**
*
* Default Value: 'basis'
*/
curve: 'basis',
// Only used in new experimental rendering
// represents the padding between the labels and the shape
padding: 15,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------- | ------- | -------- | ----------- |
* | useMaxWidth | See notes | boolean | 4 | true, false |
*
* **Notes:**
*
* When this flag is set the height and width is set to 100% and is then scaling with the
* available space if not the absolute space required is used.
*
* Default value: true
*/
useMaxWidth: true,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ----------- | ------- | -------- | ----------------------- |
* | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |
*
* **Notes:**
*
* Decides which rendering engine that is to be used for the rendering. Legal values are:
* dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid
*
* Default value: 'dagre-d3'
*/
defaultRenderer: 'dagre-d3',
},
/** The object containing configurations specific for sequence diagrams */
sequence: {
hideUnusedParticipants: false,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ---------------------------- | ------- | -------- | ------------------ |
* | activationWidth | Width of the activation rect | Integer | Required | Any Positive Value |
*
* **Notes:** Default value :10
*/
activationWidth: 10,
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | ---------------------------------------------------- | ------- | -------- | ------------------ |
* | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 50
*/
diagramMarginX: 50,
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | ------------------------------------------------- | ------- | -------- | ------------------ |
* | diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 10
*/
diagramMarginY: 10,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | --------------------- | ------- | -------- | ------------------ |
* | actorMargin | Margin between actors | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 50
*/
actorMargin: 50,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | -------------------- | ------- | -------- | ------------------ |
* | width | Width of actor boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 150
*/
width: 150,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | --------------------- | ------- | -------- | ------------------ |
* | height | Height of actor boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 65
*/
height: 65,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ------------------------ | ------- | -------- | ------------------ |
* | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 10
*/
boxMargin: 10,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | -------------------------------------------- | ------- | -------- | ------------------ |
* | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 5
*/
boxTextMargin: 5,
/**
* | Parameter | Description | Type | Required | Values |
* | ---------- | ------------------- | ------- | -------- | ------------------ |
* | noteMargin | margin around notes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 10
*/
noteMargin: 10,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | ---------------------- | ------- | -------- | ------------------ |
* | messageMargin | Space between messages | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 35
*/
messageMargin: 35,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------ | --------------------------- | ------ | -------- | ------------------------- |
* | messageAlign | Multiline message alignment | string | Required | 'left', 'center', 'right' |
*
* **Notes:** Default value: 'center'
*/
messageAlign: 'center',
/**
* | Parameter | Description | Type | Required | Values |
* | ------------ | --------------------------- | ------- | -------- | ----------- |
* | mirrorActors | Mirror actors under diagram | boolean | Required | true, false |
*
* **Notes:** Default value: true
*/
mirrorActors: true,
/**
* | Parameter | Description | Type | Required | Values |
* | ---------- | ----------------------------------------------------------------------- | ------- | -------- | ----------- |
* | forceMenus | forces actor popup menus to always be visible (to support E2E testing). | Boolean | Required | True, False |
*
* **Notes:**
*
* Default value: false.
*/
forceMenus: false,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ------------------------------------------ | ------- | -------- | ------------------ |
* | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | Required | Any Positive Value |
*
* **Notes:**
*
* Depending on css styling this might need adjustment.
*
* Default value: 1
*/
bottomMarginAdj: 1,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------- | ------- | -------- | ----------- |
* | useMaxWidth | See Notes | boolean | Required | true, false |
*
* **Notes:** When this flag is set to true, the height and width is set to 100% and is then
* scaling with the available space. If set to false, the absolute space required is used.
*
* Default value: true
*/
useMaxWidth: true,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ------------------------------------ | ------- | -------- | ----------- |
* | rightAngles | display curve arrows as right angles | boolean | Required | true, false |
*
* **Notes:**
*
* This will display arrows that start and begin at the same node as right angles, rather than a curve
*
* Default value: false
*/
rightAngles: false,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------------- | ------------------------------- | ------- | -------- | ----------- |
* | showSequenceNumbers | This will show the node numbers | boolean | Required | true, false |
*
* **Notes:** Default value: false
*/
showSequenceNumbers: false,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | -------------------------------------------------- | ------- | -------- | ------------------ |
* | actorFontSize | This sets the font size of the actor's description | Integer | Require | Any Positive Value |
*
* **Notes:** **Default value 14**..
*/
actorFontSize: 14,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ---------------------------------------------------- | ------ | -------- | --------------------------- |
* | actorFontFamily | This sets the font family of the actor's description | string | Required | Any Possible CSS FontFamily |
*
* **Notes:** Default value: "'Open Sans", sans-serif'
*/
actorFontFamily: '"Open Sans", sans-serif',
/**
* This sets the font weight of the actor's description
*
* **Notes:** Default value: 400.
*/
actorFontWeight: 400,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------ | ----------------------------------------------- | ------- | -------- | ------------------ |
* | noteFontSize | This sets the font size of actor-attached notes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 14
*/
noteFontSize: 14,
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | -------------------------------------------------- | ------ | -------- | --------------------------- |
* | noteFontFamily | This sets the font family of actor-attached notes. | string | Required | Any Possible CSS FontFamily |
*
* **Notes:** Default value: ''"trebuchet ms", verdana, arial, sans-serif'
*/
noteFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
/**
* This sets the font weight of the note's description
*
* **Notes:** Default value: 400
*/
noteFontWeight: 400,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ---------------------------------------------------- | ------ | -------- | ------------------------- |
* | noteAlign | This sets the text alignment of actor-attached notes | string | required | 'left', 'center', 'right' |
*
* **Notes:** Default value: 'center'
*/
noteAlign: 'center',
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ----------------------------------------- | ------- | -------- | ------------------- |
* | messageFontSize | This sets the font size of actor messages | Integer | Required | Any Positive Number |
*
* **Notes:** Default value: 16
*/
messageFontSize: 16,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------------- | ------------------------------------------- | ------ | -------- | --------------------------- |
* | messageFontFamily | This sets the font family of actor messages | string | Required | Any Possible CSS FontFamily |
*
* **Notes:** Default value: '"trebuchet ms", verdana, arial, sans-serif'
*/
messageFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
/**
* This sets the font weight of the message's description
*
* **Notes:** Default value: 400.
*/
messageFontWeight: 400,
/**
* This sets the auto-wrap state for the diagram
*
* **Notes:** Default value: false.
*/
wrap: false,
/**
* This sets the auto-wrap padding for the diagram (sides only)
*
* **Notes:** Default value: 0.
*/
wrapPadding: 10,
/**
* This sets the width of the loop-box (loop, alt, opt, par)
*
* **Notes:** Default value: 50.
*/
labelBoxWidth: 50,
/**
* This sets the height of the loop-box (loop, alt, opt, par)
*
* **Notes:** Default value: 20.
*/
labelBoxHeight: 20,
messageFont: function () {
return {
fontFamily: this.messageFontFamily,
fontSize: this.messageFontSize,
fontWeight: this.messageFontWeight,
};
},
noteFont: function () {
return {
fontFamily: this.noteFontFamily,
fontSize: this.noteFontSize,
fontWeight: this.noteFontWeight,
};
},
actorFont: function () {
return {
fontFamily: this.actorFontFamily,
fontSize: this.actorFontSize,
fontWeight: this.actorFontWeight,
};
},
},
/** The object containing configurations specific for gantt diagrams */
gantt: {
/**
* ### titleTopMargin
*
* | Parameter | Description | Type | Required | Values |
* | -------------- | ---------------------------------------------- | ------- | -------- | ------------------ |
* | titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 25
*/
titleTopMargin: 25,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ----------------------------------- | ------- | -------- | ------------------ |
* | barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 20
*/
barHeight: 20,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ---------------------------------------------------------------- | ------- | -------- | ------------------ |
* | barGap | The margin between the different activities in the gantt diagram | Integer | Optional | Any Positive Value |
*
* **Notes:** Default value: 4
*/
barGap: 4,
/**
* | Parameter | Description | Type | Required | Values |
* | ---------- | -------------------------------------------------------------------------- | ------- | -------- | ------------------ |
* | topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 50
*/
topPadding: 50,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------ | ----------------------------------------------------------------------- | ------- | -------- | ------------------ |
* | rightPadding | The space allocated for the section name to the right of the activities | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 75
*/
rightPadding: 75,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ---------------------------------------------------------------------- | ------- | -------- | ------------------ |
* | leftPadding | The space allocated for the section name to the left of the activities | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 75
*/
leftPadding: 75,
/**
* | Parameter | Description | Type | Required | Values |
* | -------------------- | -------------------------------------------- | ------- | -------- | ------------------ |
* | gridLineStartPadding | Vertical starting position of the grid lines | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 35
*/
gridLineStartPadding: 35,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ----------- | ------- | -------- | ------------------ |
* | fontSize | Font size | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 11
*/
fontSize: 11,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ---------------------- | ------- | -------- | ------------------ |
* | sectionFontSize | Font size for sections | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 11
*/
sectionFontSize: 11,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------------- | ---------------------------------------- | ------- | -------- | ------------------ |
* | numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |
*
* **Notes:** Default value: 4
*/
numberSectionStyles: 4,
/**
* | Parameter | Description | Type | Required | Values |
* | ---------- | --------------------------- | ---- | -------- | ---------------- |
* | axisFormat | Datetime format of the axis | 3 | Required | Date in yy-mm-dd |
*
* **Notes:**
*
* This might need adjustment to match your locale and preferences
*
* Default value: '%Y-%m-%d'.
*/
axisFormat: '%Y-%m-%d',
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------- | ------- | -------- | ----------- |
* | useMaxWidth | See notes | boolean | 4 | true, false |
*
* **Notes:**
*
* When this flag is set the height and width is set to 100% and is then scaling with the
* available space if not the absolute space required is used.
*
* Default value: true
*/
useMaxWidth: true,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ----------- | ------- | -------- | ----------- |
* | topAxis | See notes | Boolean | 4 | True, False |
*
* **Notes:** when this flag is set date labels will be added to the top of the chart
*
* **Default value false**.
*/
topAxis: false,
useWidth: undefined,
},
/** The object containing configurations specific for journey diagrams */
journey: {
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | ---------------------------------------------------- | ------- | -------- | ------------------ |
* | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 50
*/
diagramMarginX: 50,
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | -------------------------------------------------- | ------- | -------- | ------------------ |
* | diagramMarginY | Margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 10
*/
diagramMarginY: 10,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | --------------------- | ------- | -------- | ------------------ |
* | actorMargin | Margin between actors | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 50
*/
leftMargin: 150,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | -------------------- | ------- | -------- | ------------------ |
* | width | Width of actor boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 150
*/
width: 150,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | --------------------- | ------- | -------- | ------------------ |
* | height | Height of actor boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 65
*/
height: 50,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ------------------------ | ------- | -------- | ------------------ |
* | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 10
*/
boxMargin: 10,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | -------------------------------------------- | ------- | -------- | ------------------ |
* | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 5
*/
boxTextMargin: 5,
/**
* | Parameter | Description | Type | Required | Values |
* | ---------- | ------------------- | ------- | -------- | ------------------ |
* | noteMargin | Margin around notes | Integer | Required | Any Positive Value |
*
* **Notes:** Default value: 10
*/
noteMargin: 10,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | ----------------------- | ------- | -------- | ------------------ |
* | messageMargin | Space between messages. | Integer | Required | Any Positive Value |
*
* **Notes:**
*
* Space between messages.
*
* Default value: 35
*/
messageMargin: 35,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------ | --------------------------- | ---- | -------- | ------------------------- |
* | messageAlign | Multiline message alignment | 3 | 4 | 'left', 'center', 'right' |
*
* **Notes:** Default value: 'center'
*/
messageAlign: 'center',
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ------------------------------------------ | ------- | -------- | ------------------ |
* | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | 4 | Any Positive Value |
*
* **Notes:**
*
* Depending on css styling this might need adjustment.
*
* Default value: 1
*/
bottomMarginAdj: 1,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------- | ------- | -------- | ----------- |
* | useMaxWidth | See notes | boolean | 4 | true, false |
*
* **Notes:**
*
* When this flag is set the height and width is set to 100% and is then scaling with the
* available space if not the absolute space required is used.
*
* Default value: true
*/
useMaxWidth: true,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | --------------------------------- | ---- | -------- | ----------- |
* | rightAngles | Curved Arrows become Right Angles | 3 | 4 | true, false |
*
* **Notes:**
*
* This will display arrows that start and begin at the same node as right angles, rather than a curves
*
* Default value: false
*/
rightAngles: false,
taskFontSize: 14,
taskFontFamily: '"Open Sans", sans-serif',
taskMargin: 50,
// width of activation box
activationWidth: 10,
// text placement as: tspan | fo | old only text as before
textPlacement: 'fo',
actorColours: ['#8FBC8F', '#7CFC00', '#00FFFF', '#20B2AA', '#B0E0E6', '#FFFFE0'],
sectionFills: ['#191970', '#8B008B', '#4B0082', '#2F4F4F', '#800000', '#8B4513', '#00008B'],
sectionColours: ['#fff'],
},
class: {
arrowMarkerAbsolute: false,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------- | ------- | -------- | ----------- |
* | useMaxWidth | See notes | boolean | 4 | true, false |
*
* **Notes:**
*
* When this flag is set the height and width is set to 100% and is then scaling with the
* available space if not the absolute space required is used.
*
* Default value: true
*/
useMaxWidth: true,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ----------- | ------- | -------- | ----------------------- |
* | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |
*
* **Notes**:
*
* Decides which rendering engine that is to be used for the rendering. Legal values are:
* dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid
*
* Default value: 'dagre-d3'
*/
defaultRenderer: 'dagre-wrapper',
},
state: {
dividerMargin: 10,
sizeUnit: 5,
padding: 8,
textHeight: 10,
titleShift: -15,
noteMargin: 10,
forkWidth: 70,
forkHeight: 7,
// Used
miniPadding: 2,
// Font size factor, this is used to guess the width of the edges labels before rendering by dagre
// layout. This might need updating if/when switching font
fontSizeFactor: 5.02,
fontSize: 24,
labelHeight: 16,
edgeLengthFactor: '20',
compositTitleSize: 35,
radius: 5,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------- | ------- | -------- | ----------- |
* | useMaxWidth | See notes | boolean | 4 | true, false |
*
* **Notes:**
*
* When this flag is set the height and width is set to 100% and is then scaling with the
* available space if not the absolute space required is used.
*
* Default value: true
*/
useMaxWidth: true,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ----------- | ------- | -------- | ----------------------- |
* | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |
*
* **Notes:**
*
* Decides which rendering engine that is to be used for the rendering. Legal values are:
* dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid
*
* Default value: 'dagre-d3'
*/
defaultRenderer: 'dagre-wrapper',
},
/** The object containing configurations specific for entity relationship diagrams */
er: {
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | ----------------------------------------------- | ------- | -------- | ------------------ |
* | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |
*
* **Notes:**
*
* The amount of padding around the diagram as a whole so that embedded diagrams have margins,
* expressed in pixels
*
* Default value: 20
*/
diagramPadding: 20,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ---------------------------------------- | ------ | -------- | ---------------------- |
* | layoutDirection | Directional bias for layout of entities. | string | Required | "TB", "BT", "LR", "RL" |
*
* **Notes:**
*
* 'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left.
*
* T = top, B = bottom, L = left, and R = right.
*
* Default value: 'TB'
*/
layoutDirection: 'TB',
/**
* | Parameter | Description | Type | Required | Values |
* | -------------- | ---------------------------------- | ------- | -------- | ------------------ |
* | minEntityWidth | The minimum width of an entity box | Integer | Required | Any Positive Value |
*
* **Notes:** Expressed in pixels. Default value: 100
*/
minEntityWidth: 100,
/**
* | Parameter | Description | Type | Required | Values |
* | --------------- | ----------------------------------- | ------- | -------- | ------------------ |
* | minEntityHeight | The minimum height of an entity box | Integer | 4 | Any Positive Value |
*
* **Notes:** Expressed in pixels Default value: 75
*/
minEntityHeight: 75,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | ----------------------------------------------------------- | ------- | -------- | ------------------ |
* | entityPadding | Minimum internal padding betweentext in box and box borders | Integer | 4 | Any Positive Value |
*
* **Notes:**
*
* The minimum internal padding betweentext in an entity box and the enclosing box borders,
* expressed in pixels.
*
* Default value: 15
*/
entityPadding: 15,
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ----------------------------------- | ------ | -------- | -------------------- |
* | stroke | Stroke color of box edges and lines | string | 4 | Any recognized color |
*
* **Notes:** Default value: 'gray'
*/
stroke: 'gray',
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | -------------------------- | ------ | -------- | -------------------- |
* | fill | Fill color of entity boxes | string | 4 | Any recognized color |
*
* **Notes:** Default value: 'honeydew'
*/
fill: 'honeydew',
/**
* | Parameter | Description | Type | Required | Values |
* | --------- | ------------------- | ------- | -------- | ------------------ |
* | fontSize | Font Size in pixels | Integer | | Any Positive Value |
*
* **Notes:**
*
* Font size (expressed as an integer representing a number of pixels) Default value: 12
*/
fontSize: 12,
/**
* | Parameter | Description | Type | Required | Values |
* | ----------- | ----------- | ------- | -------- | ----------- |
* | useMaxWidth | See Notes | boolean | Required | true, false |
*
* **Notes:**
*
* When this flag is set to true, the diagram width is locked to 100% and scaled based on
* available space. If set to false, the diagram reserves its absolute width.
*
* Default value: true
*/
useMaxWidth: true,
},