2020-07-29 18:38:59 +02:00
|
|
|
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:
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
2020-07-29 18:38:59 +02:00
|
|
|
* **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 = {
|
2021-04-24 13:13:49 +08:00
|
|
|
/**
|
2020-07-29 18:38:59 +02:00
|
|
|
* theme , the CSS style sheet
|
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* | 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".
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
|
|
|
* <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 diamgram */
|
|
|
|
maxTextSize: 50000,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description |Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | fontFamily | specifies the font to be used in the rendered diagrams| string | Required | 'Trebuchet MS', 'Verdana', 'Arial', 'Sans-Serif' |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:** Default value is 'trebuchet ms'.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2020-11-17 11:36:34 +01:00
|
|
|
fontFamily: '"trebuchet ms", verdana, arial, sans-serif;',
|
2020-07-29 18:38:59 +02:00
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description |Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | logLevel |This option decides the amount of logging to be used.| string \| number | Required | 1, 2, 3, 4, 5 |
|
|
|
|
*
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* - debug: 1
|
|
|
|
* - info: 2
|
|
|
|
* - warn: 3
|
|
|
|
* - error: 4
|
|
|
|
* - fatal: 5 (default)
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
logLevel: 5,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description |Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | securitylevel | Level of trust for parsed diagram|string | Required | 'strict', 'loose', 'antiscript' |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes**:
|
|
|
|
*
|
|
|
|
* - **strict**: (**default**) tags in text are encoded, click functionality is disabeled
|
|
|
|
* - **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
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
securityLevel: 'strict',
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description |Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | startOnLoad | Dictates whether mermaind starts on Page load | boolean | Required | true, false |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:** Default value: true
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
startOnLoad: true,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description |Type | Required |Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | boolean | Required | true, false |
|
|
|
|
*
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes**:
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* This matters if you are using base tag settings.
|
|
|
|
*
|
|
|
|
* Default value: false
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
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.
|
2021-04-24 13:13:49 +08:00
|
|
|
|
|
|
|
* **Notes**:
|
|
|
|
*
|
|
|
|
* Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],
|
|
|
|
|
2020-11-23 23:05:41 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes**:
|
|
|
|
*
|
|
|
|
* This matters if your files are checked into sourcecontrol e.g. git and should not change unless content is changed.
|
|
|
|
*
|
|
|
|
* Default value: false
|
2020-11-23 23:05:41 +01:00
|
|
|
*/
|
|
|
|
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,
|
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* The object containing configurations specific for flowcharts
|
|
|
|
*/
|
|
|
|
flowchart: {
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels
|
|
|
|
*
|
|
|
|
* Default value: 8
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
diagramPadding: 8,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | 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 |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:** Default value: true.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
htmlLabels: true,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | nodeSpacing | Defines the spacing between nodes on the same level | Integer | Required | Any positive Numbers |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
nodeSpacing: 50,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | rankSpacing | Defines the spacing between nodes on different levels | Integer | Required | Any Positive Numbers |
|
|
|
|
*
|
|
|
|
* **Notes**:
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
rankSpacing: 50,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | curve | Defines how mermaid renders curves for flowcharts. | string | Required | 'basis', 'linear', 'cardinal'|
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default Vaue: 'basis'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2021-03-15 20:57:07 +01:00
|
|
|
curve: 'basis',
|
2020-07-29 18:38:59 +02:00
|
|
|
// Only used in new experimental rendering
|
2020-08-23 15:45:23 +02:00
|
|
|
// represents the padding between the labels and the shape
|
|
|
|
padding: 15,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See notes | boolean | 4 | true, false |
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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
|
2020-08-23 15:45:23 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true
|
2020-07-29 18:38:59 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The object containing configurations specific for sequence diagrams
|
|
|
|
*/
|
|
|
|
sequence: {
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | activationWidth | Width of the activation rect | Integer | Required | Any Positive Value |
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* **Notes:** Default value :10
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
activationWidth: 10,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Values |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:** Default value: 50
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
diagramMarginX: 50,
|
|
|
|
|
|
|
|
/**
|
|
|
|
*| Parameter | Description |Type | Required | Values|
|
|
|
|
*| --- | --- | --- | --- | --- |
|
|
|
|
*| diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Values|
|
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:** Default value: 10
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
diagramMarginY: 10,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | actorMargin | Margin between actors | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 50
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
actorMargin: 50,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | width | Width of actor boxes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 150
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
width: 150,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | height | Height of actor boxes | Integer | Required | Any Positive Value|
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 65
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
height: 65,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 10
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
boxMargin: 10,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value|
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 5
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
boxTextMargin: 5,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | noteMargin | margin around notes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 10
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
noteMargin: 10,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | messageMargin | Space between messages | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 35
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
messageMargin: 35,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | messageAlign | Multiline message alignment | string | Required | 'left', 'center', 'right' |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 'center'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
messageAlign: 'center',
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | mirrorActors | Mirror actors under diagram | boolean | Required | true, false |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: true
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
mirrorActors: true,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | 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.
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: 1
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
bottomMarginAdj: 1,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See Notes | boolean | Required | true, false |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **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
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | rightAngles | display curve arrows as right angles | boolean | Required | true, false |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
*
|
|
|
|
* This will display arrows that start and begin at the same node as right angles, rather than a curve
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: false
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
rightAngles: false,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | showSequenceNumbers | This will show the node numbers | boolean | Required | true, false |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: false
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
showSequenceNumbers: false,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | actorFontSize| This sets the font size of the actor's description | Integer | Require | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
|
|
|
***Notes:**
|
|
|
|
***Default value 14**..
|
|
|
|
*/
|
|
|
|
actorFontSize: 14,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | actorFontFamily |This sets the font family of the actor's description | string | Required | Open-Sans, Sans-Serif |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: "'Open-Sans", "sans-serif"'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
actorFontFamily: '"Open-Sans", "sans-serif"',
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* This sets the font weight of the actor's description
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: 400.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
actorFontWeight: 400,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | noteFontSize | This sets the font size of actor-attached notes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 14
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
noteFontSize: 14,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | noteFontFamily| This sets the font family of actor-attached notes. | string | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: ''"trebuchet ms", verdana, arial, sans-serif'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2020-11-17 11:36:34 +01:00
|
|
|
noteFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* This sets the font weight of the note's description
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: 400
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
noteFontWeight: 400,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | noteAlign | This sets the text alignment of actor-attached notes | string | required | 'left', 'center', 'right'|
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 'center'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
noteAlign: 'center',
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | messageFontSize | This sets the font size of actor messages | Integer | Required | Any Positive Number |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 16
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
messageFontSize: 16,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | messageFontFamily | This sets the font family of actor messages | string | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: '"trebuchet ms", verdana, arial, sans-serif'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2020-11-17 11:36:34 +01:00
|
|
|
messageFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* This sets the font weight of the message's description
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: 400.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
messageFontWeight: 400,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* This sets the auto-wrap state for the diagram
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: false.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
wrap: false,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* This sets the auto-wrap padding for the diagram (sides only)
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: 0.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
wrapPadding: 10,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* This sets the width of the loop-box (loop, alt, opt, par)
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: 50.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
labelBoxWidth: 50,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* This sets the height of the loop-box (loop, alt, opt, par)
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: 20.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
labelBoxHeight: 20,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
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
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* The object containing configurations specific for gantt diagrams
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
gantt: {
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* ### titleTopMargin
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 25
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
titleTopMargin: 25,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 20
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
barHeight: 20,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | barGap | The margin between the different activities in the gantt diagram | Integer | Optional | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 4
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
barGap: 4,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 50
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
topPadding: 50,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* | 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
|
|
|
|
*/
|
2021-02-25 10:06:13 +01:00
|
|
|
rightPadding: 75,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | leftPadding | The space allocated for the section name to the left of the activities | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 75
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
leftPadding: 75,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | gridLineStartPadding | Vertical starting position of the grid lines | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 35
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
gridLineStartPadding: 35,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | fontSize | Font size | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 11
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
fontSize: 11,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2021-02-25 10:06:13 +01:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | sectionFontSize | Font size for secions| Integer | Required | Any Positive Value |
|
2021-02-25 10:06:13 +01:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 11
|
2021-02-25 10:06:13 +01:00
|
|
|
*/
|
|
|
|
sectionFontSize: 11,
|
2020-07-29 18:38:59 +02:00
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values|
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 4
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
numberSectionStyles: 4,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | axisFormat | Datetime format of the axis | 3 | Required | Date in yy-mm-dd |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
|
|
|
* This might need adjustment to match your locale and preferences
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* Default value: '%Y-%m-%d'.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2020-08-23 15:45:23 +02:00
|
|
|
axisFormat: '%Y-%m-%d',
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See notes | boolean | 4 | true, false |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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.
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: true
|
2020-08-23 15:45:23 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true,
|
|
|
|
|
|
|
|
useWidth: undefined
|
2020-07-29 18:38:59 +02:00
|
|
|
},
|
2020-08-23 15:45:23 +02:00
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
|
|
|
* The object containing configurations specific for journey diagrams
|
|
|
|
*/
|
|
|
|
journey: {
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 50
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
diagramMarginX: 50,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | diagramMarginY | Margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 10
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2021-02-27 13:24:54 +01:00
|
|
|
diagramMarginY: 10,
|
2020-07-29 18:38:59 +02:00
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | actorMargin | Margin between actors | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 50
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2021-02-23 20:56:01 +01:00
|
|
|
leftMargin: 150,
|
2020-07-29 18:38:59 +02:00
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | width | Width of actor boxes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 150
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
width: 150,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | height | Height of actor boxes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 65
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2021-02-23 20:56:01 +01:00
|
|
|
height: 50,
|
2020-07-29 18:38:59 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
*| Parameter | Description |Type | Required | Values|
|
|
|
|
*| --- | --- | --- | --- | --- |
|
|
|
|
*| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |
|
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 10
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
boxMargin: 10,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 5
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
boxTextMargin: 5,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | noteMargin | Margin around notes | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 10
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
noteMargin: 10,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | messageMargin |Space between messages. | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
*
|
|
|
|
* Space between messages.
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: 35
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
messageMargin: 35,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | messageAlign | Multiline message alignment | 3 | 4 | 'left', 'center', 'right' |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 'center'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
messageAlign: 'center',
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | 4 | Any Positive Value |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Depending on css styling this might need adjustment.
|
|
|
|
*
|
|
|
|
* Default value: 1
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
bottomMarginAdj: 1,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See notes | boolean | 4 | true, false |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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.
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: true
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | 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
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: false
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
2021-02-23 20:56:01 +01:00
|
|
|
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']
|
2020-07-29 18:38:59 +02:00
|
|
|
},
|
|
|
|
class: {
|
2020-08-23 15:45:23 +02:00
|
|
|
arrowMarkerAbsolute: false,
|
2021-04-24 13:13:49 +08:00
|
|
|
|
2020-08-23 15:45:23 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See notes | boolean | 4 | true, false |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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.
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: true
|
2020-08-23 15:45:23 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true
|
2020-07-29 18:38:59 +02:00
|
|
|
},
|
|
|
|
git: {
|
2020-08-23 15:45:23 +02:00
|
|
|
arrowMarkerAbsolute: false,
|
|
|
|
|
|
|
|
useWidth: undefined,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See notes | boolean | 4 | true, false |
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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
|
2020-08-23 15:45:23 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true
|
2020-07-29 18:38:59 +02:00
|
|
|
},
|
|
|
|
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,
|
2020-08-23 15:45:23 +02:00
|
|
|
radius: 5,
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See notes | boolean | 4 | true, false |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* 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.
|
2020-08-23 15:45:23 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: true
|
2020-08-23 15:45:23 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true
|
2020-07-29 18:38:59 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The object containing configurations specific for entity relationship diagrams
|
|
|
|
*/
|
|
|
|
er: {
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
*
|
|
|
|
* The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels
|
|
|
|
*
|
|
|
|
* Default value: 20
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
diagramPadding: 20,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | 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.
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
|
|
|
* T = top, B = bottom, L = left, and R = right.
|
2021-04-24 13:13:49 +08:00
|
|
|
*
|
|
|
|
* Default value: 'TB'.
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
layoutDirection: 'TB',
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | minEntityWidth | The mimimum width of an entity box | Integer | Required | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Expressed in pixels.
|
|
|
|
* Default value: 100
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
minEntityWidth: 100,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | minEntityHeight| The minimum height of an entity box | Integer | 4 | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Expressed in pixels
|
|
|
|
* Default value: 75
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
minEntityHeight: 75,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | 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.
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* Default value: 15
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
entityPadding: 15,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | stroke | Stroke color of box edges and lines | string | 4 | Any recognized color |
|
|
|
|
*
|
|
|
|
* **Notes:**
|
|
|
|
* Default value: 'gray'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
stroke: 'gray',
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | fill | Fill color of entity boxes | string | 4 | Any recognized color |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
* Default value: 'honeydew'
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
fill: 'honeydew',
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | fontSize | Font Size in pixels | Integer | | Any Positive Value |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **Notes:**
|
|
|
|
*
|
|
|
|
* Font size (expressed as an integer representing a number of pixels)
|
|
|
|
* Default value: 12
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
fontSize: 12,
|
|
|
|
|
2020-08-25 17:05:01 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See Notes | boolean | Required | true, false |
|
2020-08-25 17:05:01 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **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
|
2020-08-25 17:05:01 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The object containing configurations specific for pie diagrams
|
|
|
|
*/
|
|
|
|
pie: {
|
|
|
|
useWidth: undefined,
|
|
|
|
|
2020-07-29 18:38:59 +02:00
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See Notes | boolean | Required | true, false |
|
2020-07-29 18:38:59 +02:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **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
|
2020-07-29 18:38:59 +02:00
|
|
|
*/
|
|
|
|
useMaxWidth: true
|
2021-02-23 23:26:37 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The object containing configurations specific for req diagrams
|
|
|
|
*/
|
|
|
|
requirement: {
|
|
|
|
useWidth: undefined,
|
|
|
|
|
|
|
|
/**
|
2021-04-24 13:13:49 +08:00
|
|
|
* | Parameter | Description | Type | Required | Values |
|
|
|
|
* | --- | --- | --- | --- | --- |
|
|
|
|
* | useMaxWidth | See Notes | boolean | Required | true, false |
|
2021-02-23 23:26:37 -05:00
|
|
|
*
|
2021-04-24 13:13:49 +08:00
|
|
|
* **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
|
2021-02-23 23:26:37 -05:00
|
|
|
*/
|
|
|
|
useMaxWidth: true,
|
|
|
|
|
|
|
|
rect_fill: '#f9f9f9',
|
|
|
|
text_color: '#333',
|
|
|
|
rect_border_size: '0.5px',
|
|
|
|
rect_border_color: '#bbb',
|
|
|
|
rect_min_width: 200,
|
|
|
|
rect_min_height: 200,
|
|
|
|
fontSize: 14,
|
|
|
|
rect_padding: 10,
|
|
|
|
line_height: 20
|
2020-07-29 18:38:59 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
|
|
|
config.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
|
|
|
|
|
|
|
export default config;
|