Skip to content

Commit f049594

Browse files
committed
[update] update info for new methods
1 parent 4a8afd7 commit f049594

11 files changed

+119
-72
lines changed
Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
adjustTaskHeightForBaselines
22
=============
33

4+
@short: adjusts the task's row height for proper display of baseline elements
45

5-
@todo:
6-
check the autogenerated stub
7-
8-
@short:
9-
10-
11-
@params:
12-
13-
14-
15-
6+
@params:
7+
- task (*object*) - the task object whose `row_height` will be adjusted
168

179
@example:
10+
const task = gantt.getTask(taskId);
11+
gantt.adjustTaskHeightForBaselines(task);
12+
gantt.render();
1813

19-
@template: api_method
14+
@template: api_method
2015
@descr:
16+
This method modifies the [`row_height`](desktop/resizing_rows.md) value of the provided task to ensure correct display of baseline elements.
17+
18+
Typically, there is no need to call this method directly. It is necessary only when you dynamically modify the display settings of the [gantt.config.baselines](api/gantt_baselines_config.md) config.
19+
20+
@relatedapi:
21+
api/gantt_baselines_config.md
2122

23+
@relatedsample:
24+
04_customization/15_baselines.html
Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
baseline_text
22
=============
33

4-
@todo:
5-
check the autogenerated stub
4+
@short: specifies the text displayed inside the baseline element
65

7-
8-
@short:
9-
10-
11-
@type:
6+
@params:
7+
- **task** (*Task*) - the task object associated with the baseline
8+
- **baseline** (*object*) - the baseline object
9+
- **index** (*number*) - the index of the baseline in the task's baselines array
1210

1311
@example:
12+
gantt.templates.baseline_text = function(task, baseline, index) {
13+
return "Baseline #" + (index + 1);
14+
};
15+
16+
@template: api_template
17+
@returns:
18+
- **text** (*string*) - the HTML content to be injected as the innerHTML of the baseline element. The default template returns an empty string.
1419

15-
@template: api_template
1620
@descr:
1721

1822

23+
@relatedapi:
24+
api/gantt_baselines_config.md
25+
26+
@relatedsample:
27+
04_customization/15_baselines.html

data/api/gantt_baselines_config.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
11
baselines
22
=============
33

4-
@todo:
5-
check the autogenerated stub
4+
@short: configures the functionality of baselines in the Gantt chart
65

6+
@type: object | boolean
77

8-
@short:
9-
108

11-
@type:
129
@example:
13-
14-
15-
@template: api_config
10+
gantt.config.baselines = {
11+
datastore: "baselines",
12+
render_mode: false,
13+
dataprocessor_baselines: false,
14+
row_height: 16,
15+
bar_height: 8
16+
};
17+
gantt.init("gantt_here");
18+
19+
@template: api_config
1620
@descr:
17-
18-
21+
This config defines how baselines are handled and displayed in the Gantt chart. It can be set as an object to customize the display or as a boolean to enable or disable the feature. The object configuration contains the following properties:
22+
23+
- **datastore** (*string*) - the name of the datastore used for storing baseline entries. For related functionality, see the `getDatastore` method.
24+
- **render_mode** (*boolean | string*) - determines how baselines are displayed:
25+
- `false` - baselines are not shown.
26+
- `"taskRow"` - baselines are displayed in the same row as the task bar.
27+
- `"separateRow"` - baselines are shown in a separate subrow, expanding the task row height.
28+
- `"individualRow"` - each baseline is displayed in its own subrow beneath the task.
29+
- **dataprocessor_baselines** (*boolean*) - specifies whether baseline updates trigger the DataProcessor as individual entries.
30+
- **row_height** (*number*) - defines the height of the subrow for baselines, applicable only when `render_mode` is set to `"separateRow"` or `"individualRow"`.
31+
- **bar_height** (*number*) - sets the height of the baseline bar.
32+
33+
@relatedapi:
34+
api/gantt_getdatastore.md
35+
36+
@relatedsample:
37+
04_customization/15_baselines.html

data/api/gantt_deadlines_config.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
deadlines
22
=============
33

4-
@todo:
5-
check the autogenerated stub
4+
@short: enables or disables the display of deadline elements for tasks
65

7-
8-
@short:
9-
10-
11-
@type:
6+
@type: boolean
7+
@default: true
128
@example:
9+
gantt.config.deadlines = true;
10+
gantt.init("gantt_here");
1311

14-
15-
@template: api_config
12+
@template: api_config
1613
@descr:
14+
This config enables or disables the display of deadline elements for tasks. If enabled, Gantt will check the `task.deadline` property, and if it contains a valid date, the deadline element will be displayed in the timeline.
1715

18-
16+
@relatedsample:
17+
04_customization/14_deadline.html
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
link_radius
22
=============
33

4-
@todo:
5-
check the autogenerated stub
4+
@short: sets the radius for rounding corners of link lines in the timeline
65

7-
8-
@short:
9-
10-
11-
@type:
6+
@default: 4
7+
@type: number
128
@example:
9+
gantt.config.link_radius = 6;
10+
gantt.init("gantt_here");
1311

14-
15-
@template: api_config
12+
@template: api_config
1613
@descr:
14+
The property defines the radius for rounding the corners of link lines in the timeline. If the value is less than or equal to 1, rounding is disabled. If a link segment's length is not sufficient for the specified radius, rounding will not be applied to that segment.
1715

18-
16+
@relatedapi:
17+
api/gantt_link_line_width_config.md
18+
api/gantt_link_arrow_size_config.md

data/api/gantt_onafterselect_event.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

data/desktop/custom_projects_dates.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
Manually Scheduled Summary Tasks
22
===============================
33

4-
There is a possibility to schedule summary tasks manually. This feature serves to outline project phases before all subtasks are detailed,
4+
There is a possibility to schedule [projects](desktop/task_types.md) (summary tasks) manually. This feature serves to outline project phases before all subtasks are detailed,
55
providing a framework for your project timeline.
66

77
By default, summary tasks automatically calculate their dates based on the earliest start and latest end dates of their subtasks.
88
You can also set fixed start and end dates for summary tasks independently of their subtasks. As a result, the Gantt chart will display both the fixed duration
99
and the duration derived from subtasks.
1010

11-
To activate this feature for a summary task, set the api/gantt_auto_scheduling_config.md property to *false*. The fixed dates are stored in **task.start_date** and
11+
{{sample
12+
04_customization/25_project_dates.html
13+
}}
14+
15+
To activate this feature for a summary task, set the api/gantt_auto_scheduling_config.md property to *false*.
16+
17+
The fixed dates are stored in **task.start_date** and
1218
**task.end_date**, while the computed dates from subtasks are available in **task.$auto_start_date** and **task.$auto_end_date**.
1319

1420
~~~js
@@ -20,7 +26,7 @@ gantt.parse({
2026
type: "project",
2127
start_date: "2025-05-01 00:00:00",
2228
duration: 15,
23-
auto_scheduling: false
29+
auto_scheduling: false /* ! */
2430
},
2531
// ...
2632
],

data/desktop/undo_ext.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ The returned stack is an array of the undo user actions. Each user action contai
4444
- **_value_** - (*object*) the changed task/link object
4545
- **_oldValue_** - (*object*) the task/link object before changes
4646

47+
###setUndoStack() / setRedoStack()
48+
49+
- <span class=submethod>**setUndoStack (stack: UndoRedoAction[]) **</span> - sets the stack of stored undo user actions
50+
51+
~~~js
52+
gantt.ext.undo.setUndoStack(stack);
53+
~~~
54+
55+
- <span class=submethod>**setRedoStack (stack: UndoRedoAction[]) **</span> - sets the stack of stored redo user actions
56+
57+
~~~js
58+
gantt.ext.undo.setRedoStack(stack);
59+
~~~
60+
4761
###clearUndoStack() / clearRedoStack()
4862

4963
- <span class=submethod>**clearUndoStack (): void**</span> - clears the stack of stored undo commands

data/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Start
1010
<li><a href="desktop/custom_skins.md">Skins customization with CSS variables</a></li>
1111
<li><a href="desktop/skins.md#darkskin">New Dark skin</a></li>
1212
<li><a href="desktop/baselines.md">Built-in support for Baselines</a></li>
13+
<li><a href="desktop/custom_projects_dates.md">Manually Scheduled Projects</a></li>
1314
</ul>
1415

1516
<p class='action_buttons'>

data/migrating.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The v9.0 update introduces several breaking changes.
2828

2929
### Skins switched to CSS variables
3030

31-
CSS skins (themes) have been completely reworked and now utilize CSS variables. While the HTML structure of the component and CSS class names have mostly remained unchanged, CSS styles written for older versions of the Gantt are likely no longer effective with v9.0.
31+
CSS skins (themes) have been completely reworked and now utilize CSS variables. While the HTML structure of the component and CSS class names have mostly remained unchanged, CSS styles written for older versions of the Gantt may no longer work as intended with v9.0.
3232

3333
For example, the following style was used to color tasks depending on their priority:
3434

@@ -95,7 +95,7 @@ Starting from v9.0, the same effect is achieved with the following style:
9595
Check the available variables on the desktop/custom_skins.md page.
9696

9797
{{note
98-
Migration will require the rewriting of existing CSS to achieve the required design.
98+
Migration will likely require updating of existing CSS to achieve the required design.
9999
}}
100100

101101
### Single CSS file

0 commit comments

Comments
 (0)