You probably mean the Gantt chart which displays the nodes expanded by default.
You can override the default value using row.collapsed property of the data object:
{
id: 1
start: "2019-01-01T09:00:00",
end: "2019-01-01T13:00:00",
text: "Task 1",
row: {
collapsed: true
},
children: [ ... ]
}
See also:
https://api.daypilot.org/daypilot-task-data/
The DayPilot.Row.groups.collapseAll() method doesn't control the tree node expanded/collapsed state but "concurrent event groups" in the Scheduler:
https://doc.daypilot.org/scheduler/concurrent-event-groups/