Sometimes you may find it useful not to show some levels on the Gantt immediately, but let them be open only when needed. In this article we will show you how to do it.
For example, you have a Gantt showing dozens of work packages, each of them having a couple of tasks. You want to be able to see these tasks on Gantt, but loading them immediately will make your Gantt Chart look messy and unreadable.
In this scenario, you may want to collapse temporarily all tasks, so navigation through work packages would be easier and you can open only tasks that are needed now.
To do so first, prepare a Gantt Chart, and then add a little snippet to the Item Script:
if(wi.getType().getId()==="workpackage") {
task.open=false
}
Of course, work items do not need to be called the same, you can change it depending on your project configuration.
Note: please be aware of using only straight quotation marks "" and not lopsided “”
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article