Skip to main content

summary

The functionality is available in PRO Edition only

PRO

Description

Optional. Configures advanced summary task behavior

The summary property enables advanced, built-in behavior for summary tasks. When enabled, Gantt automatically manages summary task logic such as:

  • calculating summary progress based on child tasks
  • converting parent tasks to summary tasks and back

Usage

summary?: {
autoProgress?: boolean,
autoConvert?: boolean,
};

Parameters

  • autoProgress - (optional) when set to true, the progress of summary tasks is calculated automatically based on the progress of their child tasks. The calculation uses the formula ∑(duration × progress) / ∑duration where:
    • duration is the task duration in days
    • progress is the task progress value
  • autoConvert - (optional) when set to true, tasks with child items are automatically converted into summary tasks. If all child tasks are removed, the task is automatically converted back to a regular task.

Example

<script>
import { getData } from "../data";
import { Gantt, ContextMenu } from "@svar-ui/svelte-gantt";

const data = getData();
let api;
</script>

<ContextMenu api={api}>
<Gantt
bind:this={api}
tasks={data.tasks}
links={data.links}
scales={data.scales}
cellWidth={30}
summary={{
autoProgress: true,
autoConvert: true
}}
/>
</ContextMenu>

Related article: Configuring summary tasks