gantt.addTaskLayer is not a function

Hello I’m developing a web based gantt chart and I would liketo add a baseline for the timeline.
After adding,

 gantt.addTaskLayer(function draw_planned(task) {
      //code here
  });

and running the code. It shows

Unhandled Rejection (TypeError): dhtmlx_gantt__WEBPACK_IMPORTED_MODULE_8__.gantt.addTaskLayer is not a function

Gantt.componentDidMount

src/components/Gantt/Gantt.js:173

  170 |   });  171 | }  172 | > 173 | gantt.addTaskLayer(function draw_planned(task) {      | ^  174 |     var sizes = gantt.getTaskPosition(task, task.estimatedStart, task.estimatedEnd);  175 |     var el = document.createElement('div');  176 |     el.className = 'baseline';

Hello @Asyong,

The addTaskLayer functionality is available only in “PRO” versions of gantt, and this error can get if you are trying to use it in the “GPL” version.

If you are getting this error in the “PRO” version, could you please send me a demo, which I will be able to run locally and reproduce the issue?

Hello Siarhei,

Sadly, I’m not using the PRO version. I’ll review the fetures of PRO version and I’ll think about getting it.
Thank you!