How to expand chart on load

On load my GanttChart is in collapsed mode. I want it to be expand mode on load.

By default the tree is not opened and you can use the following command to open the tree:

gantt.config.open_tree_initially = true;
However, it doesn’t work when it is specified that the task should be closed: