Difference between addTaskLayer and overlay extension

Hi,

What’s the difference between using addTaskLayer and overlay extension? Both seem to be doing the same thing?

Thanks.

Hi @Joseph,
Usually, they used for different purposes. The addTaskLayer is used to add additional elements for the tasks. And because it usually takes the task object as a parameter, it is more “flexible” in work with tasks objects

The overlay extension is a more appropriate thing, if you want to add some additional elements to the whole gantt chart.
Also, the overlay has its own specific API methods, which are available only in this extension.

Here are some samples which could make the differences more understandable:

Overlay extension:
https://docs.dhtmlx.com/gantt/samples/02_extensions/21_overlay.html

addTaskLayer:
https://docs.dhtmlx.com/gantt/samples/04_customization/14_deadline.html
https://docs.dhtmlx.com/gantt/samples/04_customization/15_baselines.html

Hi @Siarhei,

Thanks for the explanation. I think I got it better now.