Hi, I have enabled the zoom to fit feature in the toolbar of my gantt chart. When I use this, however, it zooms until I can see specific minutes, and it makes my page crash.
This is my timeline settings:
this.timelineSettings = {
topTier: {
unit: 'Month',
count: 3,
formatter: (date: Date) => {
const year = date.getFullYear();
const month = date.getMonth();
if (month >= 0 && month <= 2) {
return `Q1 ${year}`;
} else if (month >= 3 && month <= 5) {
return `Q2 ${year}`;
} else if (month >= 6 && month <= 8) {
return `Q3 ${year}`;
} else {
return `Q4 ${year}`;
}
},
},
bottomTier: {
unit: 'Month',
format: 'MMM',
},
};
The start and end date are calculated too: