Skip to main content

splitTasks

PRO

The functionality is available in PRO Edition only

Description​

Enables displaying and editing split tasks

The property controls whether the Gantt chart should display and allow editing of split tasks — tasks divided into multiple timeline segments. When splitTasks is enabled, each task can contain the segments array defined inside the tasks object. Summary tasks and milestones cannot be split.

Usage​

splitTasks?: boolean;

Parameters​

  • true - enables the split-task functionality:
    • Gantt displays task segments on the timeline
    • Editor supports segments editing
    • and a button for split actions appears in Toolbar and ContextMenu
  • false - (default) disables the split-task functionality

Example​

<script setup>
import { ref } from "vue";
import { getSplitTasksData } from "../data";
import { Gantt, ContextMenu, Editor } from "@svar/vue-gantt";
const api = ref(null);
const data = getSplitTasksData();
</script>

<template>
<ContextMenu :api="api">
<Gantt
ref="api"
:tasks="data.tasks"
:splitTasks="true"
/>
</ContextMenu>

<Editor :api="api" />
</template>

Related articles: