You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`data` - (required) the data to load. You can load data in any supported data format
24
+
-`data: object[] | { data: object[]; links: object[] } | string` - (required) the data to load. You can load data in any supported data format. The data structure depends on the diagram mode:
25
+
- for the default, org chart and mindmap Diagram modes it is set as an array that contains a set of data objects
26
+
~~~jsx
27
+
data: object[]; // an array of all shapes and connections
28
+
~~~
29
+
-for the PERT Diagram mode it is an object with:
30
+
- the `data`array (for shapes:"task", "milestone", "project")
31
+
- the `links`array (for connections between shapes)
32
+
~~~jsx
33
+
{
34
+
data: object[]; // an array of shapes (tasks, milestones, projects)
35
+
links: object[] // an array of connections between the shapes
36
+
};
37
+
~~~
25
38
-`driver`- (optional) DataDriver or type ofdata ("json", "csv", "xml"), "json" by default
Note that for the PERT Diagram mode the *links* objects in the exported data object will have [the same types as in the DHTMLX Gantt chart](https://docs.dhtmlx.com/gantt/desktop__link_properties.html). It means that if the type of a link in the Diagram data coincides with some of the Gantt links types, it will remain the same during serialization. If the link type isn't specified or set differently (for example, `type: "line"`), it will be converted into `type: "0"`.
53
+
34
54
**Related articles**: [Saving and restoring state](../../../guides/loading_data/#saving-and-restoring-state)
Copy file name to clipboardExpand all lines: docs/api/diagram/lineconfig_property.md
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,38 +15,46 @@ description: You can learn about the lineConfig property in the documentation of
15
15
~~~jsx
16
16
lineConfig?: {
17
17
lineType?:"dash"|"line",
18
-
lineGap?: number
18
+
lineGap?: number,
19
+
connectType?:"elbow"|"straight"|"curved"// the "curved" type is used only in the mindmap mode
19
20
};
20
21
~~~
21
22
22
23
### Parameters
23
24
24
-
The **lineConfig** object contains the following parameter:
25
+
The **lineConfig** object contains the following parameters:
25
26
26
27
-`lineType` - (optional) the default type of a connector line. The value is applied, if the line object doesn't contain the "type" property
27
28
-`lineGap` - (optional) sets the distance to the right-angled bend of a connector line
29
+
-`connectType` - (optional) sets the connection type of the lines: `"elbow"` | `"straight"` | `"curved"` (the "curved" type is used only in the mindmap Diagram mode). The value is applied, if the line object doesn't contain the "connectType" property
28
30
29
31
:::info
30
-
The value of the **lineType**setting will be applied, if the line object doesn't contain the identical one
32
+
The values of the **lineType**and **connectType** settings will be applied, if the line object doesn't contain the identical ones.
31
33
:::
32
34
33
35
### Default config
34
36
35
37
~~~jsx
36
38
lineConfig: {
37
-
lineType:"line",
38
-
lineGap:10
39
+
lineType:"line",
40
+
lineGap:10
39
41
}
40
42
~~~
41
43
44
+
The `connectType` parameter has the following default values:
45
+
46
+
- "elbow" - for the default and org chart Diagram modes
47
+
- "curved" - for the mindmap Diagram mode (this type is used only in the mindmap Diagram mode)
DHTMLX Diagram can be initialized in one of the following modes: "default", "org", "mindmap" or "pert". To apply the necessary mode, specify the corresponding value of the **type** property:
22
30
23
31
-**type:"default"** is used to visualize relations between some entities
-**type:"pert"** is used to show the sequences of tasks and projects, and visualize connections between them. This type of diagram is also useful in estimating the critical path and project planning
Copy file name to clipboardExpand all lines: docs/api/diagram/typeconfig_property.md
+43-11Lines changed: 43 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,16 @@ The property does not work in the Editor
12
12
13
13
### Description
14
14
15
-
@short: Optional. An object which defines the direction of the shapes in the mindmap mode of Diagram
15
+
@short: Optional. An object which provides configuration settings for Diagram in the mindmap and PERT modes
16
16
17
-
If you don't apply the **typeConfig** property, the child shapes will be arranged automatically according to the main algorithm
17
+
For Diagram in the mindmap mode, the `typeConfig` property defines the direction of the shapes. If the property isn't applied, the child shapes will be arranged automatically according to the main algorithm.
18
+
19
+
For Diagram in the PERT mode, the `typeConfig` property allows setting the format of rendering dates in the task shapes.
18
20
19
21
### Usage
20
22
23
+
- for the mindmap mode
24
+
21
25
~~~jsx
22
26
typeConfig?: {
23
27
direction?:"left"|"right";
@@ -29,24 +33,37 @@ typeConfig?: {
29
33
left?: string[],
30
34
right?: string[]
31
35
}
32
-
}
36
+
}
37
+
~~~
38
+
39
+
- for the PERT mode
40
+
41
+
~~~jsx
42
+
typeConfig?: {
43
+
dateFormat?: string; // %d-%m-%Y by default
44
+
}
33
45
~~~
34
46
35
47
### Parameters
36
48
37
-
The **typeConfig** object can include one of two parameters:
49
+
The `typeConfig` object can include one of the following parameters:
38
50
39
-
-`direction` - (optional) sets the direction of the graph:
40
-
-*"left"* - puts child shapes of the graph to the left of the root shape
41
-
-*"right"* - puts child shapes of the graph to the right of the root shape
42
-
-`side` - (optional) an object which sets the mandatory direction for the specified child shapes. The object contains a set of *key:value* pairs where *key* is the direction of the shapes (left, right) and *value* is an array with the ids of the shapes
51
+
- for the mindmap mode:
52
+
-`direction` - (optional) sets the direction of the graph:
53
+
-*"left"* - puts child shapes of the graph to the left of the root shape
54
+
-*"right"* - puts child shapes of the graph to the right of the root shape
55
+
-`side` - (optional) an object which sets the mandatory direction for the specified child shapes. The object contains a set of *key:value* pairs where *key* is the direction of the shapes (left, right) and *value* is an array with the ids of the shapes
56
+
- for the PERT mode:
57
+
-`dateFormat` - (optional) sets the format of rendering dates in the shapes of the **task** type. Affects rendering of dates in the user interface
43
58
44
59
:::tip
45
-
You can use either the **direction** attribute or the **side** one. Don't use both of them at the same time!
60
+
You can use either the `direction` attribute or the `side` one for the diagram in the mindmap mode. Don't use both of them at the same time!
- The `dateFormat` property for the PERT mode was added in v6.1
106
+
- Added in v3.1.
76
107
77
108
**Related articles**: [Arrangement of shapes in the mindmap mode of Diagram](../../../guides/diagram/configuration/#arranging-shapes-in-the-mindmap-mode-of-diagram)
78
109
79
110
**Related samples**:
80
111
81
112
-[Diagram. Mindmap mode. Direction ("left" | "right")](https://snippet.dhtmlx.com/pzllujx3)
- `height` - (optional) the height of a control. *"content"* by default
76
81
- `width` - (optional) the width of a control. *"content"* by default
77
82
- `padding` - (optional) sets padding between a cell and a border of a Combo control
78
-
- `filter` - (optional) sets a custom function for filtering Combo options. [Check the details](https://docs.dhtmlx.com/suite/combobox/customization/#custom-filter-for-options).
83
+
- `filter` - (optional) sets a custom function for filtering Combo options. [Check the details](https://docs.dhtmlx.com/suite/combobox/customization/#custom-filter-for-options)
84
+
- `eventHandlers` - (optional) adds event handlers to HTML elements of a custom template of Combo items. [Check the details](https://docs.dhtmlx.com/suite/combobox/api/combobox_eventhandlers_config/)
79
85
- `itemHeight` - (optional) sets the height of a cell in the list of options. *32* by default
80
86
- `itemsCount` - (optional) shows the total number of selected options
81
87
- `listHeight` - (optional) sets the height of the list of options. *224* by default
Copy file name to clipboardExpand all lines: docs/api/diagram_editor/editbar/config/properties_property.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ description: You can learn about the properties property of Editbar in the docum
12
12
13
13
:::info
14
14
The `properties` config allows you to do the following:
15
-
- modify Editbar controls for all or individual Diaram elements base on [**Basic controls**](api/diagram_editor/editbar/basic_controls_overview.md) and/or [**Complex controls**](api/diagram_editor/editbar/complex_controls_overview.md)
15
+
- modify Editbar controls for all or individual Diagram elements based on [**Basic controls**](api/diagram_editor/editbar/basic_controls_overview.md) and/or [**Complex controls**](api/diagram_editor/editbar/complex_controls_overview.md)
16
16
- apply custom Editbar control(s) defined via the [`controls`](api/diagram_editor/editbar/config/controls_property.md) property to Diagram elements
17
17
- specify conditions for applying an Editbar control (custom or default) to Diagram elements
0 commit comments