Resources not appearing at certain scale

I have different scales setup, but my resources aren’t showing for the month level scale - as you can see I would expect there to be resource elements for ‘Search’ and ‘Television’ in October, but nothing is displaying.

              {
                name: "month",
                scale_height: 50,
                min_column_width: 30,
                scales: [
                    { unit: "month", step: 1, date: "%M %Y" },
                    { unit: "day", step: 7, date: "%d" },
                ]
            },

Hi,

Probably it has to do with templates of the resource panel.

Values of the resource diagram are calculated using template functions:

  • gantt.templates.resource_cell_value
  • gantt.templates.resource_cell_class

Templates that are used in our examples (at least for dhtmlxGantt v7.0.x) were implemented considering a 1-day scale only, so they may work incorrectly in different time scales.

A slow but sure way of debugging this issue would be placing a breakpoint inside the resource_cell_value template and by checking calculations at problematic dates of these resources.
The template is called for every cell of every resource, so you can stop at cells that return the incorrect values and inspect what exactly is wrong.

gantt.templates.resource_cell_value = function(start_date, end_date, resource, tasks){
	if (gantt.getVisibleTaskCount() && // when the data is loaded
		resource.id == "TELEVISION ID" &&  // stop at cells where 'Television' is allocated
		end_date < new Date(2021, 11, 1) && start_date >= new Date(2021, 8, 30)) {
			debugger; // execute the template step-by-step and see what exactly is wrong
	}
	...
};

If it doesn’t help and if the issue is still relevant - can you please post the code of your resource_cell_value template so I could check?