There is the possibility to change the height of the separate rows in the grid.
The dhtmlxGantt library provides 2 ways to manage the row height:
The functionality is available in v7.1 and upper.
You can adjust the height of a particular row according to your needs.
The individual row height is currently not compatible with static background rendering.
For that, you need to redefine the row_height and bar_height properties of the task object in the data set:
Specifying the type of a task in the data set
gantt.parse({
data: [
{ id: 11, text: "Project #1", type: "project", progress: 0.6, open: true,
row_height: 70, bar_height: 60 }, { id: 12, text: "Task #1", start_date: "03-04-2018", duration: "5",
parent: "11", progress: 1, open: true },
{ id: 13, text: "Task #2", start_date: "03-04-2018", type: "project",
parent: "11", progress: 0.5, open: true }
],
links: []
});
or you can implement it dynamically:
gantt.getTask(11).row_height = 50;
gantt.getTask(11).bar_height = 25;
// re-render Gantt to apply the changes
gantt.render();
In case the row_height and bar_height attributes of the task object are not specified or empty (the default state), the values of gantt.config.row_height and gantt.config.bar_height will be used.
To give a user the possibility to resize a row in the grid by dragging the bottom border of the row, set the gantt.config.resize_rows option to true:
gantt.config.resize_rows = true;
Related sample: Resizable rows in grid
The gantt.config.min_task_grid_row_height option provides the ability to define the minimal row height that can be set for a task during resizing:
gantt.config.min_task_grid_row_height = 45;
There are 4 events that you can use to handle the behavior of resizing a row by drag-and-drop: