Load gantt data without calculation date or date propagation by parse


#1

Hello, I would like to know if it is possible to create the data table and generate the gantt chart without the need to use gantt.parse, creating a real mirror of the task.data data that I insert in the gantt, avoiding recalculations, propagation of dates between tasks-tasks and tasks-projects , regardless of the children’s dates or whether or not I have predecessors. I really need a load that generates a mirror of my values, without recalculation interference and without the need to set all tasks to manual mode.

Passing to load on parse:

tasks.data : [
{
id: 1,
type: project,
start_date: 25/06/2022,
end_date: 28/06/2022,
duration: 4,
parent: 0,
text: Element 1
},
{
id: 2,
type: task,
start_date: 25/06/2022,
end_date: 30/06/2022,
duration: 6,
parent: 1,
text: Element 2
}
]

The ‘end_date’ date of the ‘Element 1’ in the data table and graph should be 28/06/2022 and not 30/06/2022, being a json mirror added and not recalculating the date based on children as is currently happening after the gantt. parse.

is it possible to load the data without gantt.parse or changing some configuration so that I get exactly the data I pass?

Thanks for help


#2

Hello,
Unfortunately, currently it’s not possible to prevent recalculation of project dates.
In your case, Element 1 has a project type of task:
https://docs.dhtmlx.com/gantt/desktop__task_types.html#projecttasks ;
A project task is a task that starts, when its earliest child task starts, and ends, when its latest child ends. Only doable solution would be either to switch projects in your dataset to task type, or to some custom type, so you could style them as a project while keeping manual scheduling of their durations:
Please check the following snippet:
https://snippet.dhtmlx.com/oajd8fpj ;