Managing summary tasks
The functionality is available in PRO Edition only
PROThe summary property | PRO feature allows managing automatically summary task progress and make parent tasks convert to summary automatically.
Enabling the auto calculation of summary tasks' progress
By default, a user can set the progress of tasks only manually. The example below demonstrates how to enable the auto calculation of summary tasks' progress that will be based on the progress of its child tasks. You should set the autoProgress of summary to true:
<script>
import { getData } from "../data";
import { Gantt } from "@svar-ui/svelte-gantt";
const data = getData();
let api;
</script>
<Gantt
bind:this={api}
tasks={data.tasks}
links={data.links}
scales={data.scales}
cellWidth={30}
summary={{
autoProgress: true,
}}
/>
Related sample: Summary task: auto progress
Making parent tasks auto convert into summary tasks
By default, a user can convert other tasks into a summary task only manually. The example below shows how to make all parent tasks automatically convert into a summary task and vice versa (from "summary" to "task" in case no child tasks found in a task). You should set the autoConvert of summary to true:
<script>
import { getData } from "../data";
import { Gantt } from "@svar-ui/svelte-gantt";
const data = getData();
let api;
</script>
<Gantt
bind:this={api}
tasks={data.tasks}
links={data.links}
scales={data.scales}
cellWidth={30}
summary={{
autoConvert: true
}}
/>
Related sample: Summary task: auto type