Work_time not working properly ReactJS

Hi, I am trying to set work_time for my gantt chart and the documentation seems pretty straightforward. However, even when I set it to true it still shows the full day (00-23hrs). Here’s my code:
/* globals gantt */
gantt.config.duration_unit = “hour”;
gantt.config.work_time = true;
gantt.config.subscales = [{ unit: “hour”, step: 1, date: “%H” }];
gantt.init(this.container.current);
gantt.clearAll();
gantt.parse(tasks);

Here’s my gantt:

What am I doing wrong? any help would be greatly appreciated! thanks

Hello,
If you enable the work_time option, Gantt will ignore non-working time when calculating the duration. But it won’t hide non-working time in the chart. Here is the snippet where Gantt hides non-working time:
http://snippet.dhtmlx.com/caef6222f

If you need something else, please clarify.

@ramil why gantt.setworktime is not working??

Hello,
Please don’t ask the same questions in different places. Let’s continue our discussion here:
https://forum.dhtmlx.com/t/why-my-gantt-setworktime-is-not-working/76846