Dynamic Scale yearly view missing months

Attached screenshot. I’ve referred to the dynamic scale example.

setScaleConfig: (value) -> 
      when "1" ....
      when "2" ....
      when "3" ....

      when "4"
        gantt.config.scale_unit = "year";
        gantt.config.step = 1;
        gantt.config.date_scale = "%Y";
        gantt.config.min_column_width = 50;
        gantt.config.scale_height = 70;
        gantt.templates.date_scale = null;

        monthScaleTemplate = (date) ->
          dateToStr = gantt.date.date_to_str("%m")
          endDate = gantt.date.add(date, 2, "month")
          return "Q" +  ((parseInt(dateToStr(date) - 1) / 3) + 1)
          # return dateToStr(date) + " - " + dateToStr(endDate);

        gantt.config.subscales = [
          {unit:"month", step:3, template:monthScaleTemplate},
          {unit:"month", step:1, date:"%M" }
        ]


Hello,
probably the issue is caused by something else in your settings.
Here is the JS I’ve tested on basic example:

[code]gantt.config.scale_unit = “year”;
gantt.config.step = 1;
gantt.config.date_scale = “%Y”;
gantt.config.min_column_width = 50;
gantt.config.scale_height = 70;
gantt.templates.date_scale = null;

var monthScaleTemplate = function(date){
var dateToStr = gantt.date.date_to_str("%m"),
endDate = gantt.date.add(date, 2, “month”);

return "Q" +  ((parseInt(dateToStr(date) - 1, 10) / 3) + 1);
//return dateToStr(date) + " - " + dateToStr(endDate);

};
gantt.config.subscales = [
{unit:“month”, step:3, template:monthScaleTemplate},
{unit:“month”, step:1, date:"%M" }
];[/code]
The resulting scale looked correctly - screencast.com/t/stAlBsCzXA8

Can you attach a complete example?

Make sure that you don’t have ignore_time settings in your code (or that the ignores are disabled when you show the year scale). They might be responsible for skipping columns from the time scale
docs.dhtmlx.com/gantt/desktop__custom_scale.html

Hi Aliaksandr,
You are correct, I do have ignoretime which I use for other time scale like week/day and this is necessary for the views. Is there a way I can disable this in year mode (setScaleConfig method) but still keep it enabled on other modes?

Thanks

Update: fixed this by adding a validation on the ignore_time method.

    gantt.ignore_time = (date) ->
      return if gantt.config.scale_unit == "year"

      if date.getDay() == 0 || date.getDay() == 6
        return true

Seems to work. Thanks.