Hi DHTMLX Team,
I’m using DHTMLX Scheduler (Timeline / Tree Timeline view) in my Angular application to display employee shifts, holidays, and leave availability.
Everything works well for day, week, and month zoom levels — but when I zoom out to “Year” view, the scheduler becomes significantly slower (scrolling, zooming, or redrawing).
Here’s an outline of what I’m doing
markTheHolidays(): void {
const oHolidaylist = this.oConfigurationService.getHolidaysList();
const strToDate = this.oSchedulerInstance.date.str_to_date(“%Y-%m-%d”);
// Mark weekends
if (oHolidaylist.enableWeekends) {
oHolidaylist.weekends.forEach(day => {
this.oSchedulerInstance.addMarkedTimespan({
days: day,
zones: “fullday”,
css: “weekend_style”
});
});
}
// Mark holidays
oHolidaylist.holidays.forEach(date => {
const endDate = new Date(strToDate(date));
endDate.setDate(endDate.getDate() + 1);
this.oSchedulerInstance.addMarkedTimespan({
start_date: strToDate(date),
end_date: endDate,
css: “holiday_style”
});
});
this.oSchedulerInstance.updateView();
}
I also mark employee leaves and shifts with additional calls to addMarkedTimespan() for each participant row and time range.
When I switch to the Year zoom level, performance drops dramatically — likely because of the large number of marked spans and cells rendered.