schedule
Description
Enables automatic task scheduling based on end-to-start dependenciesThe schedule property activates automatic scheduling in Gantt. It controls whether task dependencies trigger cascading scheduling changes. When enabled, the system automatically adjusts dependent tasks according to end-to-start links, ensuring that successor tasks always start after their predecessors.
This is a forward-only scheduling mode: changes propagate from a task to its successors.
Usage
schedule?: {
auto?: boolean;
};
Parameters
true- enables automatic schedulingfalse- disables automatic scheduling
When automatic scheduling is enabled:
- End-to-start dependencies are enforced at all times
- On initial load, all successor tasks are shifted forward to start after their predecessors
- When a task start, end, or duration changes, all successors are automatically recalculated and moved if needed
- Backward movement respects constraints — tasks cannot be moved earlier than allowed by their predecessor’s end
- The
schedule-taskevent fires whenever cascading updates occur - End-to-start links support the
lagproperty (fixed or flexible delays) - Invalid links (circular or summary → children) are automatically removed on load and during editing
- If
projectStartis defined, all tasks are shifted forward so that the earliest task starts exactly at the project start date, and all others preserve the same relative offset.
Example
<script>
import { Gantt } from "@svar/svelte-gantt";
import { getData } from "../data";
const data = getData("basic");
</script>
<Gantt
tasks={data.tasks}
links={data.links}
schedule={{ auto: true }}
/>
Related articles: