Hi @longhai,
The snippet you use relies on the addTaskLayer method which is available in PRO versions only.
Looks like you’re using a free GPL edition of gantt, which does not have it. That would explain the error you see.
If you have a paid license, you’ll need to replace a free version of gantt with a PRO version in your project.
Currently, we don’t provide npm install for PRO version, so adding a PRO version of gantt to the project would take a couple of manual steps, please check this article on how to do it https://docs.dhtmlx.com/gantt/desktop__install_with_bower.html#addingproeditionintoproject
@Siarhei in this one : DHTMLX Snippets
I edited a bit in ‘data’, didn’t change the code. And as you can see in the image i tag in below this comment : The stage #3 overlap and cover stage # 4.
Any solution disable it? Thanks
Hi @longhai,
To avoid this issue, you should include the “Auto Scheduling” extension(available only in the PRO) and set the auto_scheduling property to true: gantt.config.auto_scheduling = true;
Auto scheduling makes the start date of the second task update according to the end date of the first task each time when it changes.
Note: To make it work, you should also create dependencies between tasks, to make gantt understand how it should schedule them.
Here is corrected snippet: http://snippet.dhtmlx.com/9e428d720
API: Auto Scheduling: https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html gantt.config.auto_scheduling: https://docs.dhtmlx.com/gantt/api__gantt_auto_scheduling_config.html
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan