Issue Display Upgrade to V 3.1

Hi,

I encountered a display issue after i upgraded gantt version to 3.1
After I called the render function, The cell size was too big and did the scrollbars are gone.
See the difference between the display before and after i upgraded to latest version.


Hi,

This is because of this property gantt.config.scale_offset_minimal. I don’t know why the two versions behave differently.

Hi,
can you please provide an example of your scales configuration? and ‘ignore_time’ settings, if you’ve defined them

Hi,

For scale setting :
function setScale(scaling_unit) {
switch (scaling_unit) {
case “hour”:
gantt.config.scale_unit = “day”;
gantt.config.step = 1;
gantt.config.date_scale = “%F %d”;
gantt.templates.date_scale = null;
gantt.config.scale_height = 27;
gantt.config.subscales = [
{unit:“hour”, step:1, date:"%H:%i"}
];
break;
case “day”:
gantt.config.scale_unit = “day”;
gantt.config.step = 1;
gantt.config.date_scale = “%d %M”;
gantt.config.subscales = [];
gantt.config.scale_height = 27;
gantt.templates.date_scale = null;
break;
case “week”:
var weekScaleTemplate = function(date){
var dateToStr = gantt.date.date_to_str("%d %M");
var endDate = gantt.date.add(gantt.date.add(date, 1, “week”), -1, “day”);
return dateToStr(date) + " - " + dateToStr(endDate);
};

        gantt.config.scale_unit = "week";
        gantt.config.step = 1;
        gantt.templates.date_scale = weekScaleTemplate;
        gantt.config.subscales = [
            {unit:"day", step:1, date:"%D" }
        ];
        gantt.config.scale_height = 50;
        break;
    case "month":
        gantt.config.scale_unit = "month";
        gantt.config.date_scale = "%F, %Y";
        gantt.config.subscales = [
            {unit:"day", step:1, date:"%j, %D" }
        ];
        gantt.config.scale_height = 50;
        gantt.templates.date_scale = null;
        break;
    case "year":
        gantt.config.scale_unit = "year";
        gantt.config.step = 1;
        gantt.config.date_scale = "%M, %Y";
        gantt.config.round_dnd_dates = false;
        gantt.config.scale_height = 50;
        var weekScaleTemplate = function(date){
            var dateToStr = gantt.date.date_to_str("Week #%W"); //("%d %M");
            var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");    
            return dateToStr(date); // + " - " + dateToStr(endDate);
        };
        
        gantt.config.subscales = [
            {unit:"week", step:1, template:weekScaleTemplate},
            {unit:"day", step:1, date:"%d %M" }
        ];
        break;
}

}

And for ignore time (this is conditional so i will set the condition to true for sample only):
if (true) {
gantt.ignore_time = function(date){
if(date.getDay() == 0 || date.getDay() == 6) {
return true;
}
return false;
};
}
else {
gantt.ignore_time = function(date){
return false;
};
}