Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e0188d6
[add] a table of default shapes types with images
mafanya23 Aug 16, 2024
19c9c5d
[update] basic shapes guide
mafanya23 Aug 27, 2024
9e7ff0d
Merge branch 'next' into mr-next-default-shapes-4590
mafanya23 Aug 27, 2024
f4bbdce
Merge branch 'next' into mr-next-default-shapes-4590
mafanya23 Aug 27, 2024
175105f
[update] minor corrections in the default shapes guide
mafanya23 Sep 17, 2024
0c90646
[update] remove unused shape images
mafanya23 Sep 17, 2024
342af15
[update] restore updates for the pdf()/png() methods
mafanya23 Oct 7, 2025
04371ff
[add] a draft for what's new of v6.1
mafanya23 Oct 7, 2025
a0d3917
[add] drafts for docs' updates for v6.1
mafanya23 Oct 10, 2025
57069b7
Merge branch 'master' into 6.1
mafanya23 Oct 14, 2025
86ead22
[add] eventHandlers property into combo control api of the editbar
mafanya23 Oct 14, 2025
9304e23
[update] images for the diagram pert mode
mafanya23 Oct 14, 2025
29cd447
Merge branch 'next' into mr-next-default-shapes-4590
mafanya23 Oct 14, 2025
aeb3e99
[add] connectType parameter description for lineConfig property
mafanya23 Oct 16, 2025
473ce54
[update] guide for data loading in the pert mode
mafanya23 Oct 16, 2025
b1fb228
[add] a draft for links properties in the pert mode
mafanya23 Oct 16, 2025
a4475df
Merge branch 'mr-next-default-shapes-4590' into 6.1
mafanya23 Oct 16, 2025
03fa680
[update] the default shapes guide
mafanya23 Oct 17, 2025
6d6c898
[update] description of the link object configuration properties
mafanya23 Oct 17, 2025
2b5bbe2
[update] default value of the url parameter of png()/pdf() methods
mafanya23 Oct 17, 2025
f03c5b3
[update] complete and improve docs for v6.1
mafanya23 Oct 22, 2025
5615241
[update] description of the lineConfig property of Diagram Editor
mafanya23 Oct 23, 2025
5cc833b
[add] details on working with data and links in the pert mode
mafanya23 Nov 4, 2025
90f94fc
[add] info on configuring the look of PERT shapes
mafanya23 Nov 4, 2025
ee9015a
[add] events' pages for shapes rotating/resizing, hotkeys property page
mafanya23 Nov 6, 2025
b1bc793
[update] complete docs for v6.1
mafanya23 Nov 10, 2025
8271ab7
[update] corrections in docs for v6.1
mafanya23 Nov 10, 2025
a9927c8
[update] project object description
mafanya23 Nov 10, 2025
003aa65
[add] new dateFormat property of Diagram typeConfig into what's new f…
mafanya23 Nov 11, 2025
abe35c9
[fix] the default type of a shape for pert mode
mafanya23 Nov 11, 2025
fc7918e
Merge pull request #64 from DHTMLX/6.1
mafanya23 Nov 11, 2025
95e4e86
[fix] broken links
mafanya23 Nov 12, 2025
6a9729b
[add] link to the diagram ai builder demo to what's new for v6.1
mafanya23 Nov 12, 2025
49e2799
[add] links to new diagram editor snippets to what's new for v6.1
mafanya23 Nov 12, 2025
e2551df
[fix] minor corrections
mafanya23 Nov 13, 2025
49718a7
[update] what's new and the `type` config page
mafanya23 Nov 13, 2025
9ecc195
[update] the basic shapes guide
mafanya23 Nov 17, 2025
cef15f8
[update] add links to new snippets into api, minor corrections in docs
mafanya23 Nov 19, 2025
28cf969
[add] a draft of page on ai integration
mafanya23 Nov 20, 2025
2209c69
[update] page draft on ai integration
mafanya23 Nov 20, 2025
b1b4ef1
[update] the ai integration guide
mafanya23 Nov 21, 2025
6f60c4d
Merge pull request #66 from DHTMLX/add-ai-integration-page-5091
mafanya23 Nov 21, 2025
0b1ffa3
[update] complete what's new for v6.1
mafanya23 Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 50 additions & 5 deletions docs/api/data_collection/parse_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,39 @@ description: You can learn about the parse method of data collection in the docu

### Description

@short: Loads data from a local data source
@short: Loads data from a local data source into a diagram and processes them

### Usage

~~~jsx
parse(
data: array | string,
data: object[] | { data: object[]; links: object[] } | string,
driver?: object | string
): void;
~~~

### Parameters

- `data` - (required) the data to load. You can load data in any supported data format
- `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:
- for the default, org chart and mindmap Diagram modes it is set as an array that contains a set of data objects
~~~jsx
data: object[]; // an array of all shapes and connections
~~~
- for the PERT Diagram mode it is an object with:
- the `data` array (for shapes: "task", "milestone", "project")
- the `links` array (for connections between shapes)
~~~jsx
{
data: object[]; // an array of shapes (tasks, milestones, projects)
links: object[] // an array of connections between the shapes
};
~~~
- `driver` - (optional) DataDriver or type of data ("json", "csv", "xml"), "json" by default

### Example

- for the org chart mode of diagram:

~~~jsx
const data = [
{
Expand All @@ -50,10 +65,40 @@ const data = [
{ id: "1-3", from: "1", to: "3", type: "line" }
];

const diagram = new dhx.Diagram("diagram_container", { type: "org" });
const diagram = new dhx.Diagram("diagram_container", {
type: "org"
});

diagram.data.parse(data);
~~~

- for the PERT mode of diagram:

~~~jsx
const dataset = {
data: [
{ id: "1", text: "Project #1", type: "project", parent: null },
{ id: "1.1", text: "Task #1", parent: "1", type: "task", start_date: new Date(2026, 0, 1), duration: 10 },
{ id: "1.2", text: "Task #2", parent: "1", type: "task", start_date: new Date(2026, 0, 1), duration: 10 },
{ id: "2.1", text: "Task #3", parent: null, type: "task", start_date: new Date(2026, 0, 1), duration: 10 },
{ id: "2.2", text: "Task #4", parent: null, type: "task", start_date: new Date(2026, 0, 1), duration: 10 },
],
links: [
{ id: "line-1", source: "1.1", target: "1.2" },
{ id: "line-2", source: "1.2", target: "2.1" },
{ id: "line-3", source: "2.1", target: "2.2" },
]
};

const diagram = new dhx.Diagram("diagram_container", {
type: "pert"
});

diagram.data.parse(dataset);
~~~

**Related articles**: [Loading and storing data](../../../guides/loading_data/)

**Related sample**: [Diagram. Org chart mode. Basic initialization](https://snippet.dhtmlx.com/5ign6fyy)
**Related samples**:
- [Diagram. Org chart mode. Basic initialization](https://snippet.dhtmlx.com/5ign6fyy)
- [Diagram. PERT chart. Initialization](https://snippet.dhtmlx.com/4h5fi7xd)
28 changes: 24 additions & 4 deletions docs/api/data_collection/serialize_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,47 @@ description: You can learn about the serialize method of data collection in the

### Description

@short: Serializes the diagram data into an array of JSON objects
@short: Exports the current diagram data

### Usage

~~~jsx
serialize(): array;
serialize(): object[] | { data: object[]; links: object[] };
~~~

### Returns

The method returns an array of JSON objects for each item and link from Diagram
Depending on the diagram mode, the method returns:

- `object[]` - (for the default, org chart and mindmap Diagram modes) an array of objects for each item and link from Diagram
- `{ data: object[]; links: object[] }` - (for the PERT Diagram mode) an object with:
- the `data` array of objects (for shapes: "task", "milestone", "project")
- the `links` array of objects (for connections between shapes)

### Example

- for the default diagram mode

~~~jsx {6}
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
});
diagram.data.parse(data);

const data = diagram.data.serialize();
const data = diagram.data.serialize(); // -> [{...}, {...}, {...}, {...}]
~~~

- for the PERT diagram mode

~~~jsx {6}
const diagram = new dhx.Diagram("diagram_container", {
type: "pert"
});
diagram.data.parse(dataset);

const dataset = diagram.data.serialize(); // -> { data: [...], links: [...] };
~~~

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"`.

**Related articles**: [Saving and restoring state](../../../guides/loading_data/#saving-and-restoring-state)
7 changes: 7 additions & 0 deletions docs/api/diagram/defaultshapetype_property.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description: You can learn about the defaultShapeType property in the documentat
@short: Optional. The default type of a shape

The value is applied, if the shape object doesn't contain the "type" property

### Usage

~~~jsx
Expand All @@ -37,6 +38,12 @@ defaultShapeType: "card"
defaultShapeType: "topic"
~~~

- In the **PERT** mode of Diagram (type: "pert")

~~~jsx
defaultShapeType: "task"
~~~

### Example

~~~jsx
Expand Down
25 changes: 17 additions & 8 deletions docs/api/diagram/lineconfig_property.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,46 @@ description: You can learn about the lineConfig property in the documentation of
~~~jsx
lineConfig?: {
lineType?: "dash" | "line",
lineGap?: number
lineGap?: number,
connectType?: "elbow" | "straight" | "curved" // the "curved" type is used only in the mindmap mode
};
~~~

### Parameters

The **lineConfig** object contains the following parameter:
The **lineConfig** object contains the following parameters:

- `lineType` - (optional) the default type of a connector line. The value is applied, if the line object doesn't contain the "type" property
- `lineGap` - (optional) sets the distance to the right-angled bend of a connector line
- `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

:::info
The value of the **lineType** setting will be applied, if the line object doesn't contain the identical one
The values of the **lineType** and **connectType** settings will be applied, if the line object doesn't contain the identical ones.
:::

### Default config

~~~jsx
lineConfig: {
lineType: "line",
lineGap: 10
lineType: "line",
lineGap: 10
}
~~~

The `connectType` parameter has the following default values:

- "elbow" - for the default and org chart Diagram modes
- "curved" - for the mindmap Diagram mode (this type is used only in the mindmap Diagram mode)

### Example

~~~jsx {2-5}
~~~jsx {2-7}
const diagram = new dhx.Diagram("diagram_container", {
type: "default",
lineConfig: {
lineType: "dash",
lineGap: 50
lineGap: 50,
connectType: "straight"
},
// other config parameters
});
Expand All @@ -60,7 +68,8 @@ The result of applying the **lineGap** property is shown in the image below:

**Change log**:

- The **lineGap** parameter is added in v5.0 (check the Migration article)
- The `connectType` parameter is added in v6.1
- The `lineGap` parameter is added in v5.0 (check the [Migration article](diagram/migration.md/#42---50))
- Added in v4.2

**Related articles**: [Setting connections between shapes](../../../lines/#setting-connections-between-shapes)
24 changes: 20 additions & 4 deletions docs/api/diagram/type_property.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,41 @@ description: You can learn about the type property in the documentation of the D
### Usage

~~~jsx
type: "default" | "org" | "mindmap";
type: "default" | "org" | "mindmap" | "pert";
~~~

### Details
### Example

DHTMLX Diagram can be initialized in one of three modes:
~~~jsx
const diagram = new dhx.Diagram("diagram_container", {
type: "default" // "org" | "mindmap" | "pert"
});
~~~

### Diagram modes

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:

- **type:"default"** is used to visualize relations between some entities

<iframe src="https://snippet.dhtmlx.com/f3uekgjw?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

- **type:"org"** is used to show the structure of a group of people by presenting their relations in a hierarchical order

<iframe src="https://snippet.dhtmlx.com/5ign6fyy?mode=js" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>
<iframe src="https://snippet.dhtmlx.com/5ign6fyy?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

- **type:"mindmap"** is used to arrange information on some topic by representing the main concept surrounded by associated ideas

<iframe src="https://snippet.dhtmlx.com/twd25ww1?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

- **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

<iframe src="https://snippet.dhtmlx.com/4h5fi7xd?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

**Change log**:

- The **"pert"** type was added in v6.1

**Related articles**:

- [Overview](../../../)
Expand Down
54 changes: 43 additions & 11 deletions docs/api/diagram/typeconfig_property.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ The property does not work in the Editor

### Description

@short: Optional. An object which defines the direction of the shapes in the mindmap mode of Diagram
@short: Optional. An object which provides configuration settings for Diagram in the mindmap and PERT modes

If you don't apply the **typeConfig** property, the child shapes will be arranged automatically according to the main algorithm
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.

For Diagram in the PERT mode, the `typeConfig` property allows setting the format of rendering dates in the task shapes.

### Usage

- for the mindmap mode

~~~jsx
typeConfig?: {
direction?: "left" | "right";
Expand All @@ -29,24 +33,37 @@ typeConfig?: {
left?: string[],
right?: string[]
}
}
}
~~~

- for the PERT mode

~~~jsx
typeConfig?: {
dateFormat?: string; // %d-%m-%Y by default
}
~~~

### Parameters

The **typeConfig** object can include one of two parameters:
The `typeConfig` object can include one of the following parameters:

- `direction` - (optional) sets the direction of the graph:
- *"left"* - puts child shapes of the graph to the left of the root shape
- *"right"* - puts child shapes of the graph to the right of the root shape
- `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
- for the mindmap mode:
- `direction` - (optional) sets the direction of the graph:
- *"left"* - puts child shapes of the graph to the left of the root shape
- *"right"* - puts child shapes of the graph to the right of the root shape
- `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
- for the PERT mode:
- `dateFormat` - (optional) sets the format of rendering dates in the shapes of the **task** type. Affects rendering of dates in the user interface

:::tip
You can use either the **direction** attribute or the **side** one. Don't use both of them at the same time!
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!
:::

### Example

- for the mindmap mode:

~~~jsx {3-5}
const diagram = new dhx.Diagram("diagram_container", {
type: "mindmap",
Expand All @@ -70,13 +87,28 @@ const diagram = new dhx.Diagram("diagram_container", {
});
~~~

The other child shapes that are not set in the **side** option will be arranged automatically according to the main algorithm.
Note that the other child shapes that are not set in the `side` option will be arranged automatically according to the main algorithm.

- for the PERT mode:

~~~jsx {3-5}
const diagram = new dhx.Diagram("diagram_container", {
type: "pert",
typeConfig: {
dateFormat: "%d/%m/%Y"
}
});
~~~

**Change log**:

**Change log**: Added in v3.1.
- The `dateFormat` property for the PERT mode was added in v6.1
- Added in v3.1.

**Related articles**: [Arrangement of shapes in the mindmap mode of Diagram](../../../guides/diagram/configuration/#arranging-shapes-in-the-mindmap-mode-of-diagram)

**Related samples**:

- [Diagram. Mindmap mode. Direction ("left" | "right")](https://snippet.dhtmlx.com/pzllujx3)
- [Diagram. Mindmap mode. Custom sides](https://snippet.dhtmlx.com/atto9ckg)
- [Diagram and Gantt. PERT chart. Full integration](https://snippet.dhtmlx.com/gcnx4a9h)
8 changes: 7 additions & 1 deletion docs/api/diagram_editor/editbar/basic_controls/combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ description: You can explore the Combo control of Editbar in the documentation o
padding?: string | number,

filter?: (item: any, input: string) => boolean,
eventHandlers?: {
[eventName: string]: {
[className: string]: (event: Event, id: string | number) => void | boolean;
};
},
itemHeight?: number | string, // 32 by default
itemsCount?: boolean | ((count: number) => string),
listHeight?: number | string, // 224 by default
Expand Down Expand Up @@ -75,7 +80,8 @@ Option configuration object inside Combo:
- `height` - (optional) the height of a control. *"content"* by default
- `width` - (optional) the width of a control. *"content"* by default
- `padding` - (optional) sets padding between a cell and a border of a Combo control
- `filter` - (optional) sets a custom function for filtering Combo options. [Check the details](https://docs.dhtmlx.com/suite/combobox/customization/#custom-filter-for-options).
- `filter` - (optional) sets a custom function for filtering Combo options. [Check the details](https://docs.dhtmlx.com/suite/combobox/customization/#custom-filter-for-options)
- `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/)
- `itemHeight` - (optional) sets the height of a cell in the list of options. *32* by default
- `itemsCount` - (optional) shows the total number of selected options
- `listHeight` - (optional) sets the height of the list of options. *224* by default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: You can learn about the properties property of Editbar in the docum

:::info
The `properties` config allows you to do the following:
- 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)
- 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)
- apply custom Editbar control(s) defined via the [`controls`](api/diagram_editor/editbar/config/controls_property.md) property to Diagram elements
- specify conditions for applying an Editbar control (custom or default) to Diagram elements

Expand Down
Loading
Loading