showTask Whether the method is valid

I used the method provided in the example to show the specified task when the page loads,But no matter how you set it up, it didn’t work,Is there any way to provide it directly.

Hello,

The querySelector method returns only elements that exist in the DOM. Gantt adds to the DOM only tasks that are displayed in the visible part of the timeline. Therefore, querySelector won’t be able to find task elements outside the visible part of the timeline.

Could you please clarify the need for manually scrolling the timeline? dhxgantt.showTask(id) is a built-in method that automatically scrolls the timeline to display the specified task.

Here is an example: DHTMLX Snippet Tool