Display no records found message in Gantt


We are using DHTMLX Gantt “v.7.1.9 Professional” and our project is based on “Angular: 12.2.7”. We have provided the functionality to filter tasks in Gantt and we need to display a message when there are no matching records available with a button to clear filters (Gantt columns should be visible even though no records found). Below are the mockups for different views that can be switched by users (users can switch between grid and chart, grid only and chart only views). Could you please provide us a way to get this behavior.

Thank you.

Hello Madhuka,
Gantt doesn’t have a built-in functionality for that. You need to implement a custom solution by using the Gantt API and Javascript.

The easiest way to do that is to check the number of task rows. And if there are no tasks, you can attach an image to the grid and timeline elements. If you add a new task, the previous image will disappear because the parent element will be destroyed and recreated.
Here is an example that can help you to start:

1 Like

Hello Madhuka,
The dev team added the feature that allows showing the empty state screen:

You can see how it works in the following sample:

1 Like