Skip to content

Resource Leveling

Source code
import { GANTT_RESOURCE_PLANNING_DEMO } from './gantt-advanced-data';
import { loadAdvancedGanttDemo } from './GanttAdvancedVanillaDemo';
export function load(parentSelector: string) {
return loadAdvancedGanttDemo(parentSelector, GANTT_RESOURCE_PLANNING_DEMO);
}

Enable deterministic auto-leveling with:

grid.gantt = {
scheduling: {
resourceLeveling: 'auto',
resourceLevelingWithinSlack: false,
},
};

Auto-leveling delays later overlapping automatic tasks until the resource is available, then reports resource-leveling-adjustment.

Per-task leveling controls:

const task = {
priority: 900, // 0-1000; higher priority is protected first
canLevel: true, // false keeps the task fixed during auto-leveling
levelingDelayDays: 2, // stored calendar-day delay applied by leveling
};

Deterministic auto-leveling order:

  1. Non-levelable tasks first (fixed blockers).
  2. Higher priority before lower priority.
  3. Earlier start date, then task id.

The leveling implementation avoids moving:

  • Manually scheduled tasks.
  • Tasks with actualStartDate or actualFinishDate.
  • Summary tasks.
  • Inactive tasks.
  • Tasks pinned by must-start-on or must-finish-on.