schedule
The functionality is available in PRO Edition only
PRODescription
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
onScheduleTaskevent 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
import { Gantt } from "@svar/react-gantt";
import { getData } from "../data";
export default function App() {
const data = getData("basic");
return (
<Gantt
tasks={data.tasks}
links={data.links}
schedule={{ auto: true }}
onScheduleTask={(event) => {
// handle cascading scheduling updates
// event contains details about updated tasks/links
}}
/>
);
}
Related articles: