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
@short: adjusts the padding around task bars in the timeline when `bar_height` is set to "full"
5
+
6
+
@type: number
7
+
@default: 9
8
+
@example:
9
+
gantt.config.bar_height_padding = 5;
10
+
gantt.init("gantt_here");
11
+
12
+
@template: api_config
13
+
@descr:
14
+
The `bar_height_padding` config defines the vertical padding for task bars in the timeline when `gantt.config.bar_height` is set to "full". The height of a task bar is calculated as `gantt.config.row_height - gantt.config.bar_height_padding`.
15
+
16
+
- Setting this config to `0` will make the task bars occupy the full height of the row.
17
+
- Increasing the value adds more space above and below the bars.
18
+
19
+
The example below shows a smaller padding value, which leaves less space around the task bars:
20
+
21
+
~~~js
22
+
gantt.config.bar_height_padding=3;
23
+
~~~
24
+
25
+
<imgsrc="api/bar_height_padding_small.png">
26
+
27
+
In this example, a larger padding value leaves more empty space above and below the task bars:
Copy file name to clipboardExpand all lines: data/api/refs/gantt.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Gantt API
16
16
- api/gantt_addtask.md - adds a new task
17
17
- api/gantt_addtasklayer.md - displays an additional layer with custom elements for a task in the timeline area
18
18
- api/gantt_adjusttaskheightforbaselines.md - adjusts the task's row height for proper display of baseline elements
19
+
- api/gantt_adjusttaskheightforbaselines.md - adjusts the task's row height for proper display of baseline elements
19
20
- api/gantt_alert.md - calls an alert message box
20
21
- api/gantt_assert.md - if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen
21
22
- api/gantt_attachevent.md - attaches the handler to an inner event of dhtmlxGantt
@@ -259,7 +260,6 @@ Gantt API
259
260
- api/gantt_onbeforerowdragmove_event.md - fires before a row of the grid is dragged vertically to a different position
260
261
- api/gantt_onbeforerowresize_event.md - fires before the user starts to resize the row height by drag-and-drop
261
262
- api/gantt_onbeforerowresizeend_event.md - fires before resizing of the row height is completed
262
-
- api/gantt_onbeforeselect_event.md -
263
263
- api/gantt_onbeforesplittaskdisplay_event.md - fires before a part of the split task is displayed on the Gantt chart
264
264
- api/gantt_onbeforetaskadd_event.md - fires before a new task is added to the Gantt chart
265
265
- api/gantt_onbeforetaskautoschedule_event.md - fires for each task which is rescheduled
@@ -351,6 +351,7 @@ Gantt API
351
351
- api/gantt_autosize_config.md - forces the Gantt chart to automatically change its size to show all tasks without scrolling
352
352
- api/gantt_autosize_min_width_config.md - sets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode
353
353
- api/gantt_bar_height_config.md - sets the height of task bars in the timeline area
354
+
- api/gantt_bar_height_padding_config.md - adjusts the padding around task bars in the timeline when `bar_height` is set to "full"
354
355
- api/gantt_baselines_config.md - configures the functionality of baselines in the Gantt chart
355
356
- api/gantt_branch_loading_config.md - enables dynamic loading in the Gantt chart
356
357
- api/gantt_branch_loading_property_config.md - specifies that the task has children that are not yet loaded from the backend
@@ -483,7 +484,6 @@ Gantt API
483
484
- api/gantt_task_date_config.md - sets the format of the date label in the 'Time period' section of the lightbox
484
485
- api/gantt_task_grid_row_resizer_attribute_config.md - sets the name of the attribute of the resizer's DOM element of the grid row. The attribute presents the row's index
485
486
- api/gantt_task_height_config.md - sets the height of task bars in the timeline area
486
-
- api/gantt_task_height_offset_config.md -
487
487
- api/gantt_task_scroll_offset_config.md - sets the offset (in pixels) of the nearest task from the left border in the timeline
488
488
- api/gantt_time_picker_config.md - sets the format of the time drop-down selector in the lightbox
489
489
- api/gantt_time_step_config.md - sets the minimum step (in minutes) for the task's time values
Copy file name to clipboardExpand all lines: data/api/refs/gantt_props.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ Properties
18
18
- api/gantt_autosize_config.md - forces the Gantt chart to automatically change its size to show all tasks without scrolling
19
19
- api/gantt_autosize_min_width_config.md - sets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode
20
20
- api/gantt_bar_height_config.md - sets the height of task bars in the timeline area
21
+
- api/gantt_bar_height_padding_config.md - adjusts the padding around task bars in the timeline when `bar_height` is set to "full"
21
22
- api/gantt_baselines_config.md - configures the functionality of baselines in the Gantt chart
22
23
- api/gantt_branch_loading_config.md - enables dynamic loading in the Gantt chart
23
24
- api/gantt_branch_loading_property_config.md - specifies that the task has children that are not yet loaded from the backend
@@ -150,7 +151,6 @@ Properties
150
151
- api/gantt_task_date_config.md - sets the format of the date label in the 'Time period' section of the lightbox
151
152
- api/gantt_task_grid_row_resizer_attribute_config.md - sets the name of the attribute of the resizer's DOM element of the grid row. The attribute presents the row's index
152
153
- api/gantt_task_height_config.md - sets the height of task bars in the timeline area
153
-
- api/gantt_task_height_offset_config.md -
154
154
- api/gantt_task_scroll_offset_config.md - sets the offset (in pixels) of the nearest task from the left border in the timeline
155
155
- api/gantt_time_picker_config.md - sets the format of the time drop-down selector in the lightbox
156
156
- api/gantt_time_step_config.md - sets the minimum step (in minutes) for the task's time values
0 commit comments