This is the default behavior of Highcharts Gantt. The x and y axes render their values from your series data. Without the data, it is impossible to determine what values should be displayed on those axes, therefore no chart is displayed.
It is completely up to you what would you like to display in case of no data to display.
From Highcharts perspective, I can suggest using a no-data-to-display.js module.
I am not able to help you with that case without looking at your code. Reproduce it in an online code editor, and then I'll be able to suggest some solutions.