Implementing Syncfusion Vue Gantt Chart
A project management component that renders a Microsoft Project-like interface for scheduling and managing tasks, dependencies, and resources in Vue 2 and Vue 3 applications.
When to Use This Skill
Use this skill when the user needs to:
- Set up the Gantt Chart in a Vue 2 (Vue CLI) or Vue 3 (Vite) project
- Bind data — local arrays, self-referential data, or remote DataManager sources
- Schedule tasks — auto/manual modes, duration, baselines, unscheduled tasks, work calendar
- Manage task dependencies — FS, FF, SS, SF predecessor types, connector lines
- Edit tasks — cell editing, dialog editing, taskbar drag/resize, adding/deleting rows, indent/outdent
- Work with resources — assign resources, resource view, multi-taskbar view
- Configure columns — reorder, resize, freeze, span, templates, WBS, checkbox
- Customize the timeline — top/bottom tiers, zooming, time units (hour to decade), infinite scrolling
- Filter and sort — column menu filter, Excel-like filter, toolbar search, sorting
- Select rows or cells — row/cell selection, selection events
- Use the toolbar — built-in items (Add, Edit, Delete, Search, ExpandAll…) and custom items
- Customize taskbars and labels — templates, data markers/indicators, tooltips (taskbar / connector line / baseline / timeline), label settings
- Add event markers and holidays — project milestone lines, non-working days
- Export — Excel (single/multiple Gantt, custom data) and PDF (headers, footers, custom)
- Control layout — splitter position, loading animation, state persistence
- Undo / Redo actions in the Gantt
- Enable virtual scrolling for large datasets
- Configure timezone and globalization — locale, RTL, timezone offset
- Context menu — right-click quick actions for rows and column headers
- Critical path — highlight tasks that determine the project end date
Component Overview
| Feature |
Module to Inject |
Key Property / API |
| Editing |
Edit |
editSettings |
| Filtering |
Filter |
allowFiltering |
| Sorting |
Sort |
allowSorting |
| Selection |
Selection |
selectionSettings |
| Toolbar |
Toolbar |
toolbar |
| Day Markers |
DayMarkers |
eventMarkers, holidays |
| Excel Export |
ExcelExport |
excelExport() |
| PDF Export |
PdfExport |
pdfExport() |
| Virtual Scroll |
VirtualScroll |
enableVirtualization |
| Critical Path |
CriticalPath |
enableCriticalPath |
| Undo / Redo |
UndoRedo |
enableUndoRedo, undoRedoStepsCount, undoRedoActions |
| Column Menu |
ColumnMenu |
showColumnMenu |
| Context Menu |
ContextMenu |
contextMenuItems |
Package: @syncfusion/ej2-vue-gantt
Component tag: <ejs-gantt>
Composition API import: GanttComponent as EjsGantt
Options API component key: 'ejs-gantt': GanttComponent
Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Vite (Vue 3) and Vue CLI (Vue 2) project setup
- Installing
@syncfusion/ej2-vue-gantt and theme package
- CSS reference using Syncfusion theme packages
- Composition API and Options API registration
- Minimal working example with
taskFields
- Module injection pattern (
provide)
- Quasar framework setup
- Error handling with
actionFailure
Data Binding
📄 Read: references/data-binding.md
- Local array data (hierarchical and self-referential/flat with
parentID)
- Remote data with DataManager (ODataV4, WebAPI)
- Remote save persistence with
RemoteSaveAdaptor (batchUrl)
- Sending extra parameters to the server via
load + Query.addParams()
- Handling server exceptions using
actionFailure
- Binding data from external Ajax requests (local binding)
- Load-on-demand (lazy load child rows)
- Immutable data mode
- Large data virtual scrolling
Task Scheduling
📄 Read: references/task-scheduling.md
- Auto, Manual, Custom scheduling modes (
taskMode)
Auto (default): dates validated against working time, holidays, weekends, predecessors
Manual: all dates taken as-is from data source — no auto-adjustment
validateManualTasksOnLinking: true — enforce predecessor dates even in Manual mode
- Custom mode: per-task scheduling via
taskFields.manual boolean field (true = manual)
taskFields mapping (id, name, startDate, endDate, duration, durationUnit, progress, parentID, dependency, work, type, notes, etc.)
- Global duration unit (
durationUnit — day, hour, minute; default day)
- Map per-task duration unit via
taskFields.durationUnit data field
- Inline duration unit in duration string:
'3days', '12hours', '1800minutes'
- Unscheduled task types: start-only, end-only, duration-only, milestone (
duration: 0)
allowUnscheduledTasks: false auto-fills missing dates with duration=1 + project start
- Working time range (
dayWorkingTime with from/to — inject DayMarkers)
- Per-day working hours (
weekWorkingTime — overrides dayWorkingTime for listed days; unlisted days fall back to dayWorkingTime)
- Non-working days:
workWeek array + highlightWeekends
includeWeekend: true to count weekends in duration calculations
Baseline
📄 Read: references/baseline.md
- Enabling baseline visualization (
renderBaseline: true)
- Baseline field mapping (
baselineStartDate, baselineEndDate, baselineDuration)
- Baseline milestone creation (
baselineDuration: 0)
- Color customization via
baselineColor property or .e-baseline-bar CSS class
- Baseline templates —
baselineTemplate for custom rendering, multiple baselines per task (original vs revised)
- Template API access to internal metrics (
baselineTop, baselineHeight, taskBarHeight, getTaskLeft())
- Render multiple baselines (compare original/revised/draft schedules)
- Best for: schedule variance tracking, milestone planning, phase comparisons
Task Constraints
📄 Read: references/task-constraints.md
- 8 constraint types table: ASAP (0), ALAP (1), MSO (2), MFO (3), SNET (4), SNLT (5), FNET (6), FNLT (7)
taskFields.constraintType — maps numeric constraint type field from data
taskFields.constraintDate — maps the constraint date field from data
- Strict constraint types that trigger violation popup: MSO, MFO, SNLT, FNLT
actionBegin with requestType === 'validateTaskViolation' — intercept violations
args.validateMode.respectMustStartOn/Off flags — silent enforcement (suppress popup)
- All four flags:
respectMustStartOn, respectMustFinishOn, respectStartNoLaterThan, respectFinishNoLaterThan
- Display constraint name as right label via named slot +
data.ganttProperties.constraintType
- Required modules:
Selection, Toolbar, DayMarkers, Edit, Filter, Sort, ContextMenu
Task Dependencies
📄 Read: references/task-dependencies.md
- Predecessor types: FS, SS, FF, SF — format
"{ID}{Type}" e.g. "2FS", "3SS"
- Lag/lead with unit suffix:
"2FS+2days", "4FF+960m", "7SS+16h", "3FS-1days"
- Multiple predecessors comma-separated:
"2FS,3FF"
taskFields.dependency — maps predecessor string field
allowParentDependency: true (default) — allow parent-to-parent/child links
- Connector lines render automatically when
dependency is mapped
- Interactive drawing: drag taskbar handle — requires
Edit module + allowTaskbarEditing: true
autoUpdatePredecessorOffset: true — recalculates offsets on initial load to match calendar-adjusted positions
- Runtime toggle:
this.$refs.gantt.ej2Instances.autoUpdatePredecessorOffset = value
updateOffsetOnTaskbarEdit: false — disables auto offset update when dragging taskbar
actionBegin with requestType === 'validateLinkedTask' — handle dependency validation
args.validateMode.respectLink — revert edit if it violates link
args.validateMode.removeLink — remove link and keep edit
args.validateMode.preserveLinkWithEditing — update offset and keep both (default true)
- Validation dialog: shown when all modes disabled; 2 or 3 options depending on direction
- Show/hide lines:
.e-gantt-dependency-view-container visibility CSS toggle
Managing Tasks (Editing)
📄 Read: references/managing-tasks.md
- Enabling editing (
editSettings) — inject Edit module
- Cell editing (Auto mode), dialog editing, taskbar editing
- Cell edit types:
numericedit, dropdownedit, booleanedit, datepickeredit, datetimepickeredit
- Cell edit template (
create/write/read/destroy hooks)
- Disable editing for a specific column (
columns.allowEditing: false)
- Read-only Gantt (
readOnly: true)
- Adding tasks via toolbar, context menu, or
editModule.addRecord()
- Open new task dialog with default values (
actionBegin + beforeOpenAddDialog)
- Customize dialog tabs (
addDialogFields / editDialogFields with fields and additionalParams)
- Customize Notes tab with RTE
inlineMode via additionalParams
- Deleting tasks via toolbar or
editModule.deleteRow(); confirm dialog with showDeleteConfirmDialog
- Indent and outdent — toolbar items or
indent() / outdent() methods
- Splitting tasks at load time — Hierarchical (
taskFields.segments with embedded Segments array) or Self-referential (taskFields.segmentId + segmentData flat collection), dynamically via context menu, dialog, or splitTask()
- Merging segments via context menu or drag; limitations (no parent/milestone splits)
- Taskbar editing: drag, resize, progress handle, connector points
- Prevent taskbar editing for specific tasks (
taskbarEditing event + args.cancel)
- Hide taskbar edit handles via
queryTaskbarInfo + CSS .e-preventEdit
- Taskbar editing tooltip (
tooltipSettings.editing template)
- Touch interaction: double-tap, tap-and-drag, connector point tap
- Column validation rules (
columns.validationRules)
- Custom validation (callback function in
validationRules)
- Dependency/Resource grid validation via
actionBegin (beforeOpenEditDialog)
- Server-side CRUD with
UrlAdaptor + batchUrl (added/changed/deleted collections)
updateRecordByID(), addRecord(), deleteRecord(), indent(), outdent()
Resources
📄 Read: references/resources.md
- Defining resource collection and
resourceFields
- Assigning resources to tasks (
resourceInfo)
- Resource view layout
- Multi-taskbar view
- Resource unit and work allocation
Columns
📄 Read: references/columns.md
- Column definition (
field, headerText, width, format)
ColumnsDirective / e-columns + e-column directives
- Column reordering, resizing, spanning
- Frozen columns
- Column menu
- Column templates
- WBS (work breakdown structure) column
- Responsive columns
- Checkbox selection column
Timeline
📄 Read: references/timeline.md
timelineSettings — top tier and bottom tier units
- Time units: Hour, Day, Week, Month, Year, Decade
- Custom timeline labels / formatters
- Zooming (zoom in, zoom out, zoom to fit)
timelineUnitSize
timelineViewMode shortcut (set both tiers at once)
viewStartDate / viewEndDate — fixed visible date range
weekStartDay — custom first day of week (0–6)
updateTimescaleView — auto-update timescale on task changes
showTooltip — timeline cell tooltip on hover
showWeekend — show or hide weekend columns
timelineTemplate — custom cell content for timeline tiers
enableInfiniteTimelineScroll — enable infinite horizontal scrolling (extends timeline dynamically as user navigates)
Filtering and Sorting
📄 Read: references/filtering-and-sorting.md
- Column menu filtering (
allowFiltering)
- Excel-like filter
- Toolbar search box
filterSettings configuration
- Column sorting (
allowSorting)
- Multi-column sorting
sortSettings
- Programmatic
gantt.search(key) method
searchSettings — fields, operator, ignoreCase
- Keyboard shortcuts for sort add / remove
- Sorting events via
actionBegin / actionComplete (args.requestType === 'sorting')
- Touch sorting: tap column headers; multi-column sorting uses a popup
Selection
📄 Read: references/selection.md
allowSelection: false — disable selection
- Selection mode:
'Row' / 'Cell' / 'Both'
- Selection type:
'Single' / 'Multiple'
selectedRowIndex — pre-select a row on initial load
- Select rows dynamically (
selectRow, selectRows)
- Select rows based on condition via
dataBound
- Cell selection —
getSelectedRowCellIndexes()
- Multiple cell selection with Ctrl+Click
- Select cell dynamically (
selectCell)
- Toggle selection (
enableToggle)
- Hover highlighting (
enableHover)
selectionSettings full reference table
- Programmatic APIs (
clearSelection, getSelectedRecords, getSelectedRowIndexes)
- Full events table (rowSelecting, rowSelected, rowDeselecting, rowDeselected, cellSelecting, cellSelected, cellDeselected)
- Prevent row selection via
rowSelecting (args.cancel = true)
- Prevent cell selection via
cellSelecting (args.cancel = true)
- Checkbox selection with
checkboxMode options
- Touch interaction (single tap + multi-select popup)
Toolbar
📄 Read: references/toolbar.md
- Built-in toolbar items: Add, Edit, Update, Delete, Cancel, Search, ExpandAll, CollapseAll, ZoomIn, ZoomOut, ZoomToFit, ExcelExport, PdfExport, PrevTimeSpan, NextTimeSpan, Undo, Redo
- Custom toolbar items with
click handler
- Toolbar events
Taskbar and Labels
📄 Read: references/taskbar-and-labels.md
- Taskbar customization (height, color, template)
labelSettings — left, right, taskLabel
- Data markers / indicators
- Task tooltips
- Connector line tooltip
- Baseline tooltip
- Timeline tooltip
- Progress bar customization
- Parent and milestone taskbar appearance
Event Markers and Holidays
📄 Read: references/event-markers-and-holidays.md
eventMarkers — vertical lines with labels on key dates
holidays — non-working day highlights
- Working time configuration
- Weekend highlights (
highlightWeekends)
- Inject
DayMarkers module
Export (Excel and PDF)
📄 Read: references/export.md
- Excel export (basic, custom data source, multiple Gantt charts)
- PDF export (basic, header/footer, customization)
- Export properties and callbacks
Rows and Scrolling
📄 Read: references/rows-and-scrolling.md
rowHeight — uniform row height in pixels (default 46px)
collapseAllParentTasks: true — start all parents collapsed
taskFields.expandState — map a boolean data field to per-task expand/collapse state
expanding / collapsing events — args.cancel = true to block specific rows
expanded / collapsed events — fire after action (no cancel)
rowDataBound — style entire rows; queryCellInfo — style individual cells
- Alternate row styling:
.e-altrow (grid) + tr.e-chart-row:nth-child(even) (chart)
- Row spanning via
queryCellInfo args.rowSpan
columns.clipMode — Clip | Ellipsis | EllipsisWithTooltip (default)
- Row drag and drop — inject
RowDD, Edit; allowRowDragAndDrop: true
allowTaskbarDragAndDrop — taskbar position drag between rows
rowDragStartHelper — prevent drag conditionally via args.cancel
rowDrop — validate/cancel drop; args.dropPosition = 'above'|'below'|'child'
reorderRows(fromIndexes, toIndex, position) — programmatic row reorder
scrollToDate('MM/DD/YYYY') — scroll timeline to a date
scrollToTask('id') — scroll chart to a task's taskbar
setScrollTop(px) — vertical scroll; also via ganttChartModule.scrollObject.setScrollTop()
- Responsive container:
height: '100%', width: '100%' (parent needs explicit height)
- Virtual scrolling:
enableVirtualization: true, inject VirtualScroll
enableTimelineVirtualization — render only visible timeline columns
Layout and Splitter
📄 Read: references/layout-and-splitter.md
splitterSettings — column index or position
- Loading animation
- State persistence (
enablePersistence)
- localStorage key format (
'gantt' + componentId)
- Get / set persisted state manually
- Prevent specific properties from persisting (
addOnPersist override)
- Restore header templates after reload (
getPersistData + treeGrid.setProperties)
- What does NOT persist (column template, headerText, headerTemplate, formatter, valueAccessor)
- Global and local context configuration
- Height, width, and responsive layout
Undo / Redo
📄 Read: references/undo-redo.md
- Enabling undo/redo (
enableUndoRedo: true, inject UndoRedo)
undoRedoStepsCount — history depth
undoRedoActions — restrict which actions are tracked
- Full supported actions table (19 action types including ZoomIn/Out, ColumnResize, etc.)
- Toolbar Undo/Redo items
- Programmatic
undo() / redo()
getUndoActions() / getRedoActions()
clearUndoCollection() / clearRedoCollection()
Accessibility
📄 Read: references/accessibility.md
- WCAG 2.1 Level AA compliance
- Keyboard navigation (grid, toolbar, context menu shortcuts)
- ARIA roles and attributes (treegrid, row, gridcell, columnheader, dialog)
- Theme support (tailwind3, material, material3, bootstrap5, fluent, fabric, highcontrast) via npm theme packages
- Screen reader support (NVDA, JAWS, VoiceOver) — taskbarAriaLabel customization via queryTaskbarInfo
- Focus management and autoFocusTasks
Programmatic Methods
📄 Read: references/gantt-methods.md
- Access instance via
this.$refs.gantt (Options API) — ref="gantt" on <ejs-gantt>
- Column:
autoFitColumns(fieldNames?), getGanttColumns(), getGridColumns(), refreshColumns(), reorderColumns(from, to)
- Task editing:
cancelEdit(), changeTaskMode(data), convertToMilestone(id), deleteRecord(taskDetail), updateRecordByIndex(index, data), updateTaskId(currentId, newId)
- Row expand/collapse:
expandByID(), expandByIndex(), collapseByID(), collapseByIndex()
- Split/Merge:
splitTask(taskId, splitDate), mergeTask(taskId, segmentIndexes)
- Predecessor:
removePredecessor(id)
- Querying:
getRecordByID(id), getRecordByIndex(), getTaskByUniqueID(id), getTaskInfo(taskId), getCurrentViewData(), getExpandedRecords(records), getCriticalTasks()
- DOM access:
getRowByID(id), getRowByIndex(index), getTaskbarHeight()
- Formatting helpers:
getDurationString(duration, unit), getWorkString(work, unit)
- Scroll:
scrollToTask(taskId), setScrollTop(scrollTop), updateChartScrollOffset(left, top)
- Data:
updateDataSource(dataSource, args)
- Sort:
removeSortColumn(columnName)
- Selection:
selectCells(rowCellIndexes) — requires selectionSettings.mode: 'Cell'
Context Menu
📄 Read: references/context-menu.md
- Inject
ContextMenu, Edit, Sort, Resize, Selection modules
- Enable:
enableContextMenu: true, allowSorting: true, allowResizing: true
- Default built-in items table:
AutoFit, AutoFitAll, SortAscending, SortDescending, TaskInformation, Add, Indent, Outdent, DeleteTask, Save, Cancel, DeleteDependency, Convert
- Custom items: mix built-in strings + descriptor objects
{ text, id, target, iconCss }
target: '.e-content' restricts item to row right-click; target: '.e-gridheader' to header
contextMenuClick event — handle custom actions via args.item.id
contextMenuOpen event — hide items dynamically via args.hideItems; check args.type !== 'Header'
- Touch: long press on a row to open context menu
Critical Path
📄 Read: references/critical-path.md
- Enabling critical path (
enableCriticalPath, inject CriticalPath)
- Toolbar toggle button (
'CriticalPath')
- Customizing critical taskbar colors via
queryTaskbarInfo
data.isCritical and data.slack properties
- Near-critical task detection using slack time
Timezone and Globalization
📄 Read: references/timezone-and-globalization.md
timezone — IANA string (e.g. 'UTC', 'America/New_York') applied at render time
timezone: 'UTC' — display same times for all users regardless of local clock
- Hourly timeline: combine
timezone + durationUnit: 'Hour' + dateFormat: 'hh:mm a' + bottom tier unit: 'Hour'
- CRUD with timezone: edits operate in configured timezone;
actionComplete receives local-time-reversed date for DB persistence
args.data.ganttProperties.endDate in actionComplete — post-edit value already converted back to local time
Timezone class (@syncfusion/ej2-base) — manual timezone arithmetic
timezone.offset(date, tz) → offset in minutes from UTC
timezone.convert(date, fromOffset, toOffset) → date in target timezone (IANA or numeric)
timezone.remove(date, tz) → strips offset, returns wall-clock time as plain date
- Locale and globalization (
locale, L10n.load())
- RTL support (
enableRtl: true + locale strings)
- Date format configuration on columns (
format: 'dd/MM/yyyy' or 'yMd')
currencyCode — set currency for monetary columns
Quick Start (Vue 3 — Composition API)
npm install @syncfusion/ej2-vue-gantt --save
<template>
<ejs-gantt
id="gantt"
:dataSource="data"
:taskFields="taskFields"
height="450px"
></ejs-gantt>
</template>
<script setup>
import { GanttComponent as EjsGantt } from '@syncfusion/ej2-vue-gantt';
const data = [
{ TaskID: 1, TaskName: 'Planning', StartDate: new Date('04/02/2019'), EndDate: new Date('04/06/2019'), ParentID: null },
{ TaskID: 2, TaskName: 'Identify location', StartDate: new Date('04/02/2019'), Duration: 4, Progress: 50, ParentID: 1 },
{ TaskID: 3, TaskName: 'Perform soil test', StartDate: new Date('04/02/2019'), Duration: 4, Progress: 50, ParentID: 1 },
];
const taskFields = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
endDate: 'EndDate',
duration: 'Duration',
progress: 'Progress',
parentID: 'ParentID'
};
</script>
<style>
@import "../node_modules/@syncfusion/ej2-tailwind3-theme/styles/gantt/index.css";
</style>
Quick Start (Vue 3 — Options API)
<script>
import { GanttComponent, Edit, Filter, Sort, Toolbar, Selection, DayMarkers } from '@syncfusion/ej2-vue-gantt';
export default {
name: 'App',
components: { 'ejs-gantt': GanttComponent },
data() {
return {
data: [...],
taskFields: { id: 'TaskID', name: 'TaskName', startDate: 'StartDate', duration: 'Duration', progress: 'Progress', parentID: 'ParentID' },
toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'ExpandAll', 'CollapseAll'],
editSettings: { allowAdding: true, allowEditing: true, allowDeleting: true, allowTaskbarEditing: true }
};
},
provide: {
gantt: [Edit, Filter, Sort, Toolbar, Selection, DayMarkers]
}
};
</script>
Common Patterns
Pattern 1 — Inject Only What You Use
Features in the Gantt Chart require explicit module injection. Only inject modules for features you enable to keep bundle size lean:
// Composition API (Vue 3)
import { provide } from 'vue';
import { Edit, Filter, Sort, Toolbar } from '@syncfusion/ej2-vue-gantt';
provide('gantt', [Edit, Filter, Sort, Toolbar]);
// Options API
provide: { gantt: [Edit, Filter, Sort, Toolbar] }
Pattern 2 — Self-Referential vs Hierarchical Data
// Self-referential (flat array with ParentID — recommended for CRUD)
taskFields: { id: 'TaskID', name: 'TaskName', startDate: 'StartDate', duration: 'Duration', parentID: 'ParentID' }
// Hierarchical (nested subtasks array)
taskFields: { id: 'TaskID', name: 'TaskName', startDate: 'StartDate', duration: 'Duration', child: 'subtasks' }
Pattern 3 — Full-Featured Gantt
<ejs-gantt
:dataSource="data"
:taskFields="taskFields"
:editSettings="editSettings"
:toolbar="toolbar"
:allowFiltering="true"
:allowSorting="true"
:splitterSettings="{ columnIndex: 2 }"
:timelineSettings="{ topTier: { unit: 'Week' }, bottomTier: { unit: 'Day' } }"
height="500px"
></ejs-gantt>
Key Props Reference
| Prop |
Type |
Purpose |
dataSource |
Array / DataManager |
Task data |
taskFields |
Object |
Maps data fields to Gantt fields |
height |
String |
Component height (e.g., '450px') |
toolbar |
Array |
Toolbar item names or custom item objects |
editSettings |
Object |
Controls which edit operations are allowed |
allowFiltering |
Boolean |
Enables column filter menu |
allowSorting |
Boolean |
Enables column header sorting |
timelineSettings |
Object |
Top/bottom tier units and format |
splitterSettings |
Object |
Grid/chart panel width split |
labelSettings |
Object |
Left, right, and task label fields |
resources |
Array |
Resource collection |
resourceFields |
Object |
Maps resource id/name fields |
eventMarkers |
Array |
Vertical marker lines with labels |
holidays |
Array |
Non-working day definitions |
projectStartDate |
Date |
Explicit project start |
projectEndDate |
Date |
Explicit project end |
enableVirtualization |
Boolean |
Virtual row rendering for large data |
enableCriticalPath |
Boolean |
Highlights critical path tasks |
baselineTemplate |
function/string |
Custom baseline rendering for planned schedules and advanced baseline layouts |
enableInfiniteTimelineScroll |
boolean |
Enable infinite horizontal timeline scrolling by extending the visible range as the user navigates |
1---2name: syncfusion-vue-gantt-chart3description: Implement Syncfusion Vue Gantt Chart (@syncfusion/ej2-vue-gantt) for Vue 2 and Vue 3. Use this when building project scheduling interfaces with task timelines, dependencies, and resource management. Covers data binding, task scheduling, columns, filtering, editing, Excel/PDF export, critical path, and resource allocation. Supports ejs-gantt and GanttComponent.4---56# Implementing Syncfusion Vue Gantt Chart78A project management component that renders a Microsoft Project-like interface for scheduling and managing tasks, dependencies, and resources in Vue 2 and Vue 3 applications.910## When to Use This Skill1112Use this skill when the user needs to:13- **Set up the Gantt Chart** in a Vue 2 (Vue CLI) or Vue 3 (Vite) project14- **Bind data** — local arrays, self-referential data, or remote DataManager sources15- **Schedule tasks** — auto/manual modes, duration, baselines, unscheduled tasks, work calendar16- **Manage task dependencies** — FS, FF, SS, SF predecessor types, connector lines17- **Edit tasks** — cell editing, dialog editing, taskbar drag/resize, adding/deleting rows, indent/outdent18- **Work with resources** — assign resources, resource view, multi-taskbar view19- **Configure columns** — reorder, resize, freeze, span, templates, WBS, checkbox20- **Customize the timeline** — top/bottom tiers, zooming, time units (hour to decade), infinite scrolling21- **Filter and sort** — column menu filter, Excel-like filter, toolbar search, sorting22- **Select rows or cells** — row/cell selection, selection events23- **Use the toolbar** — built-in items (Add, Edit, Delete, Search, ExpandAll…) and custom items24- **Customize taskbars and labels** — templates, data markers/indicators, tooltips (taskbar / connector line / baseline / timeline), label settings25- **Add event markers and holidays** — project milestone lines, non-working days26- **Export** — Excel (single/multiple Gantt, custom data) and PDF (headers, footers, custom)27- **Control layout** — splitter position, loading animation, state persistence28- **Undo / Redo** actions in the Gantt29- **Enable virtual scrolling** for large datasets30- **Configure timezone and globalization** — locale, RTL, timezone offset31- **Context menu** — right-click quick actions for rows and column headers32- **Critical path** — highlight tasks that determine the project end date3334## Component Overview3536| Feature | Module to Inject | Key Property / API |37|---|---|---|38| Editing | `Edit` | `editSettings` |39| Filtering | `Filter` | `allowFiltering` |40| Sorting | `Sort` | `allowSorting` |41| Selection | `Selection` | `selectionSettings` |42| Toolbar | `Toolbar` | `toolbar` |43| Day Markers | `DayMarkers` | `eventMarkers`, `holidays` |44| Excel Export | `ExcelExport` | `excelExport()` |45| PDF Export | `PdfExport` | `pdfExport()` |46| Virtual Scroll | `VirtualScroll` | `enableVirtualization` |47| Critical Path | `CriticalPath` | `enableCriticalPath` |48| Undo / Redo | `UndoRedo` | `enableUndoRedo`, `undoRedoStepsCount`, `undoRedoActions` |49| Column Menu | `ColumnMenu` | `showColumnMenu` |50| Context Menu | `ContextMenu` | `contextMenuItems` |5152**Package:** `@syncfusion/ej2-vue-gantt` 53**Component tag:** `<ejs-gantt>` 54**Composition API import:** `GanttComponent as EjsGantt` 55**Options API component key:** `'ejs-gantt': GanttComponent`5657## Navigation Guide5859### Getting Started60📄 **Read:** [references/getting-started.md](references/getting-started.md)61- Vite (Vue 3) and Vue CLI (Vue 2) project setup62- Installing `@syncfusion/ej2-vue-gantt` and theme package63- CSS reference using Syncfusion theme packages64- Composition API and Options API registration65- Minimal working example with `taskFields`66- Module injection pattern (`provide`)67- Quasar framework setup68- Error handling with `actionFailure`6970### Data Binding71📄 **Read:** [references/data-binding.md](references/data-binding.md)72- Local array data (hierarchical and self-referential/flat with `parentID`)73- Remote data with DataManager (ODataV4, WebAPI)74- Remote save persistence with `RemoteSaveAdaptor` (`batchUrl`)75- Sending extra parameters to the server via `load` + `Query.addParams()`76- Handling server exceptions using `actionFailure`77- Binding data from external Ajax requests (local binding)78- Load-on-demand (lazy load child rows)79- Immutable data mode80- Large data virtual scrolling8182### Task Scheduling83📄 **Read:** [references/task-scheduling.md](references/task-scheduling.md)84- Auto, Manual, Custom scheduling modes (`taskMode`)85- `Auto` (default): dates validated against working time, holidays, weekends, predecessors86- `Manual`: all dates taken as-is from data source — no auto-adjustment87- `validateManualTasksOnLinking: true` — enforce predecessor dates even in Manual mode88- Custom mode: per-task scheduling via `taskFields.manual` boolean field (`true` = manual)89- `taskFields` mapping (id, name, startDate, endDate, duration, durationUnit, progress, parentID, dependency, work, type, notes, etc.)90- Global duration unit (`durationUnit` — `day`, `hour`, `minute`; default `day`)91- Map per-task duration unit via `taskFields.durationUnit` data field92- Inline duration unit in duration string: `'3days'`, `'12hours'`, `'1800minutes'`93- Unscheduled task types: start-only, end-only, duration-only, milestone (`duration: 0`)94- `allowUnscheduledTasks: false` auto-fills missing dates with duration=1 + project start95- Working time range (`dayWorkingTime` with `from`/`to` — inject `DayMarkers`)96- Per-day working hours (`weekWorkingTime` — overrides `dayWorkingTime` for listed days; unlisted days fall back to `dayWorkingTime`)97- Non-working days: `workWeek` array + `highlightWeekends`98- `includeWeekend: true` to count weekends in duration calculations99100### Baseline101📄 **Read:** [references/baseline.md](references/baseline.md)102- Enabling baseline visualization (`renderBaseline: true`)103- Baseline field mapping (`baselineStartDate`, `baselineEndDate`, `baselineDuration`)104- Baseline milestone creation (`baselineDuration: 0`)105- Color customization via `baselineColor` property or `.e-baseline-bar` CSS class106- **Baseline templates** — `baselineTemplate` for custom rendering, multiple baselines per task (original vs revised)107- Template API access to internal metrics (`baselineTop`, `baselineHeight`, `taskBarHeight`, `getTaskLeft()`)108- Render multiple baselines (compare original/revised/draft schedules)109- Best for: schedule variance tracking, milestone planning, phase comparisons110111### Task Constraints112📄 **Read:** [references/task-constraints.md](references/task-constraints.md)113- 8 constraint types table: ASAP (0), ALAP (1), MSO (2), MFO (3), SNET (4), SNLT (5), FNET (6), FNLT (7)114- `taskFields.constraintType` — maps numeric constraint type field from data115- `taskFields.constraintDate` — maps the constraint date field from data116- Strict constraint types that trigger violation popup: MSO, MFO, SNLT, FNLT117- `actionBegin` with `requestType === 'validateTaskViolation'` — intercept violations118- `args.validateMode.respectMustStartOn/Off` flags — silent enforcement (suppress popup)119- All four flags: `respectMustStartOn`, `respectMustFinishOn`, `respectStartNoLaterThan`, `respectFinishNoLaterThan`120- Display constraint name as right label via named slot + `data.ganttProperties.constraintType`121- Required modules: `Selection`, `Toolbar`, `DayMarkers`, `Edit`, `Filter`, `Sort`, `ContextMenu`122123### Task Dependencies124📄 **Read:** [references/task-dependencies.md](references/task-dependencies.md)125- Predecessor types: FS, SS, FF, SF — format `"{ID}{Type}"` e.g. `"2FS"`, `"3SS"`126- Lag/lead with unit suffix: `"2FS+2days"`, `"4FF+960m"`, `"7SS+16h"`, `"3FS-1days"`127- Multiple predecessors comma-separated: `"2FS,3FF"`128- `taskFields.dependency` — maps predecessor string field129- `allowParentDependency: true` (default) — allow parent-to-parent/child links130- Connector lines render automatically when `dependency` is mapped131- Interactive drawing: drag taskbar handle — requires `Edit` module + `allowTaskbarEditing: true`132- `autoUpdatePredecessorOffset: true` — recalculates offsets on initial load to match calendar-adjusted positions133- Runtime toggle: `this.$refs.gantt.ej2Instances.autoUpdatePredecessorOffset = value`134- `updateOffsetOnTaskbarEdit: false` — disables auto offset update when dragging taskbar135- `actionBegin` with `requestType === 'validateLinkedTask'` — handle dependency validation136- `args.validateMode.respectLink` — revert edit if it violates link137- `args.validateMode.removeLink` — remove link and keep edit138- `args.validateMode.preserveLinkWithEditing` — update offset and keep both (default `true`)139- Validation dialog: shown when all modes disabled; 2 or 3 options depending on direction140- Show/hide lines: `.e-gantt-dependency-view-container` `visibility` CSS toggle141142### Managing Tasks (Editing)143📄 **Read:** [references/managing-tasks.md](references/managing-tasks.md)144- Enabling editing (`editSettings`) — inject `Edit` module145- Cell editing (Auto mode), dialog editing, taskbar editing146- Cell edit types: `numericedit`, `dropdownedit`, `booleanedit`, `datepickeredit`, `datetimepickeredit`147- Cell edit template (`create`/`write`/`read`/`destroy` hooks)148- Disable editing for a specific column (`columns.allowEditing: false`)149- Read-only Gantt (`readOnly: true`)150- Adding tasks via toolbar, context menu, or `editModule.addRecord()`151- Open new task dialog with default values (`actionBegin` + `beforeOpenAddDialog`)152- Customize dialog tabs (`addDialogFields` / `editDialogFields` with `fields` and `additionalParams`)153- Customize Notes tab with RTE `inlineMode` via `additionalParams`154- Deleting tasks via toolbar or `editModule.deleteRow()`; confirm dialog with `showDeleteConfirmDialog`155- Indent and outdent — toolbar items or `indent()` / `outdent()` methods156- Splitting tasks at load time — **Hierarchical** (`taskFields.segments` with embedded `Segments` array) or **Self-referential** (`taskFields.segmentId` + `segmentData` flat collection), dynamically via context menu, dialog, or `splitTask()`157- Merging segments via context menu or drag; limitations (no parent/milestone splits)158- Taskbar editing: drag, resize, progress handle, connector points159- Prevent taskbar editing for specific tasks (`taskbarEditing` event + `args.cancel`)160- Hide taskbar edit handles via `queryTaskbarInfo` + CSS `.e-preventEdit`161- Taskbar editing tooltip (`tooltipSettings.editing` template)162- Touch interaction: double-tap, tap-and-drag, connector point tap163- Column validation rules (`columns.validationRules`)164- Custom validation (callback function in `validationRules`)165- Dependency/Resource grid validation via `actionBegin` (`beforeOpenEditDialog`)166- Server-side CRUD with `UrlAdaptor` + `batchUrl` (`added`/`changed`/`deleted` collections)167- `updateRecordByID()`, `addRecord()`, `deleteRecord()`, `indent()`, `outdent()`168169### Resources170📄 **Read:** [references/resources.md](references/resources.md)171- Defining resource collection and `resourceFields`172- Assigning resources to tasks (`resourceInfo`)173- Resource view layout174- Multi-taskbar view175- Resource unit and work allocation176177### Columns178📄 **Read:** [references/columns.md](references/columns.md)179- Column definition (`field`, `headerText`, `width`, `format`)180- `ColumnsDirective` / `e-columns` + `e-column` directives181- Column reordering, resizing, spanning182- Frozen columns183- Column menu184- Column templates185- WBS (work breakdown structure) column186- Responsive columns187- Checkbox selection column188189### Timeline190📄 **Read:** [references/timeline.md](references/timeline.md)191- `timelineSettings` — top tier and bottom tier units192- Time units: Hour, Day, Week, Month, Year, Decade193- Custom timeline labels / formatters194- Zooming (zoom in, zoom out, zoom to fit)195- `timelineUnitSize`196- `timelineViewMode` shortcut (set both tiers at once)197- `viewStartDate` / `viewEndDate` — fixed visible date range198- `weekStartDay` — custom first day of week (0–6)199- `updateTimescaleView` — auto-update timescale on task changes200- `showTooltip` — timeline cell tooltip on hover201- `showWeekend` — show or hide weekend columns202- `timelineTemplate` — custom cell content for timeline tiers203- `enableInfiniteTimelineScroll` — enable infinite horizontal scrolling (extends timeline dynamically as user navigates)204205### Filtering and Sorting206📄 **Read:** [references/filtering-and-sorting.md](references/filtering-and-sorting.md)207- Column menu filtering (`allowFiltering`)208- Excel-like filter209- Toolbar search box210- `filterSettings` configuration211- Column sorting (`allowSorting`)212- Multi-column sorting213- `sortSettings`214- Programmatic `gantt.search(key)` method215- `searchSettings` — fields, operator, ignoreCase216- Keyboard shortcuts for sort add / remove217- Sorting events via `actionBegin` / `actionComplete` (`args.requestType === 'sorting'`)218- Touch sorting: tap column headers; multi-column sorting uses a popup219220### Selection221📄 **Read:** [references/selection.md](references/selection.md)222- `allowSelection: false` — disable selection223- Selection mode: `'Row'` / `'Cell'` / `'Both'`224- Selection type: `'Single'` / `'Multiple'`225- `selectedRowIndex` — pre-select a row on initial load226- Select rows dynamically (`selectRow`, `selectRows`)227- Select rows based on condition via `dataBound`228- Cell selection — `getSelectedRowCellIndexes()`229- Multiple cell selection with Ctrl+Click230- Select cell dynamically (`selectCell`)231- Toggle selection (`enableToggle`)232- Hover highlighting (`enableHover`)233- `selectionSettings` full reference table234- Programmatic APIs (`clearSelection`, `getSelectedRecords`, `getSelectedRowIndexes`)235- Full events table (rowSelecting, rowSelected, rowDeselecting, rowDeselected, cellSelecting, cellSelected, cellDeselected)236- Prevent row selection via `rowSelecting` (`args.cancel = true`)237- Prevent cell selection via `cellSelecting` (`args.cancel = true`)238- Checkbox selection with `checkboxMode` options239- Touch interaction (single tap + multi-select popup)240241### Toolbar242📄 **Read:** [references/toolbar.md](references/toolbar.md)243- Built-in toolbar items: Add, Edit, Update, Delete, Cancel, Search, ExpandAll, CollapseAll, ZoomIn, ZoomOut, ZoomToFit, ExcelExport, PdfExport, PrevTimeSpan, NextTimeSpan, Undo, Redo244- Custom toolbar items with `click` handler245- Toolbar events246247### Taskbar and Labels248📄 **Read:** [references/taskbar-and-labels.md](references/taskbar-and-labels.md)249- Taskbar customization (height, color, template)250- `labelSettings` — left, right, taskLabel251- Data markers / indicators252- Task tooltips253- Connector line tooltip254- Baseline tooltip255- Timeline tooltip256- Progress bar customization257- Parent and milestone taskbar appearance258259### Event Markers and Holidays260📄 **Read:** [references/event-markers-and-holidays.md](references/event-markers-and-holidays.md)261- `eventMarkers` — vertical lines with labels on key dates262- `holidays` — non-working day highlights263- Working time configuration264- Weekend highlights (`highlightWeekends`)265- Inject `DayMarkers` module266267### Export (Excel and PDF)268📄 **Read:** [references/export.md](references/export.md)269- Excel export (basic, custom data source, multiple Gantt charts)270- PDF export (basic, header/footer, customization)271- Export properties and callbacks272273### Rows and Scrolling274📄 **Read:** [references/rows-and-scrolling.md](references/rows-and-scrolling.md)275- `rowHeight` — uniform row height in pixels (default `46px`)276- `collapseAllParentTasks: true` — start all parents collapsed277- `taskFields.expandState` — map a boolean data field to per-task expand/collapse state278- `expanding` / `collapsing` events — `args.cancel = true` to block specific rows279- `expanded` / `collapsed` events — fire after action (no cancel)280- `rowDataBound` — style entire rows; `queryCellInfo` — style individual cells281- Alternate row styling: `.e-altrow` (grid) + `tr.e-chart-row:nth-child(even)` (chart)282- Row spanning via `queryCellInfo` `args.rowSpan`283- `columns.clipMode` — `Clip` | `Ellipsis` | `EllipsisWithTooltip` (default)284- Row drag and drop — inject `RowDD`, `Edit`; `allowRowDragAndDrop: true`285- `allowTaskbarDragAndDrop` — taskbar position drag between rows286- `rowDragStartHelper` — prevent drag conditionally via `args.cancel`287- `rowDrop` — validate/cancel drop; `args.dropPosition` = `'above'|'below'|'child'`288- `reorderRows(fromIndexes, toIndex, position)` — programmatic row reorder289- `scrollToDate('MM/DD/YYYY')` — scroll timeline to a date290- `scrollToTask('id')` — scroll chart to a task's taskbar291- `setScrollTop(px)` — vertical scroll; also via `ganttChartModule.scrollObject.setScrollTop()`292- Responsive container: `height: '100%'`, `width: '100%'` (parent needs explicit height)293- Virtual scrolling: `enableVirtualization: true`, inject `VirtualScroll`294- `enableTimelineVirtualization` — render only visible timeline columns295296### Layout and Splitter297📄 **Read:** [references/layout-and-splitter.md](references/layout-and-splitter.md)298- `splitterSettings` — column index or position299- Loading animation300- State persistence (`enablePersistence`)301- localStorage key format (`'gantt' + componentId`)302- Get / set persisted state manually303- Prevent specific properties from persisting (`addOnPersist` override)304- Restore header templates after reload (`getPersistData` + `treeGrid.setProperties`)305- What does NOT persist (column template, headerText, headerTemplate, formatter, valueAccessor)306- Global and local context configuration307- Height, width, and responsive layout308309### Undo / Redo310📄 **Read:** [references/undo-redo.md](references/undo-redo.md)311- Enabling undo/redo (`enableUndoRedo: true`, inject `UndoRedo`)312- `undoRedoStepsCount` — history depth313- `undoRedoActions` — restrict which actions are tracked314- Full supported actions table (19 action types including ZoomIn/Out, ColumnResize, etc.)315- Toolbar Undo/Redo items316- Programmatic `undo()` / `redo()`317- `getUndoActions()` / `getRedoActions()`318- `clearUndoCollection()` / `clearRedoCollection()`319320### Accessibility321📄 **Read:** [references/accessibility.md](references/accessibility.md)322- WCAG 2.1 Level AA compliance323- Keyboard navigation (grid, toolbar, context menu shortcuts)324- ARIA roles and attributes (treegrid, row, gridcell, columnheader, dialog)325- Theme support (tailwind3, material, material3, bootstrap5, fluent, fabric, highcontrast) via npm theme packages326- Screen reader support (NVDA, JAWS, VoiceOver) — taskbarAriaLabel customization via queryTaskbarInfo327- Focus management and autoFocusTasks328329### Programmatic Methods330📄 **Read:** [references/gantt-methods.md](references/gantt-methods.md)331- Access instance via `this.$refs.gantt` (Options API) — `ref="gantt"` on `<ejs-gantt>`332- **Column:** `autoFitColumns(fieldNames?)`, `getGanttColumns()`, `getGridColumns()`, `refreshColumns()`, `reorderColumns(from, to)`333- **Task editing:** `cancelEdit()`, `changeTaskMode(data)`, `convertToMilestone(id)`, `deleteRecord(taskDetail)`, `updateRecordByIndex(index, data)`, `updateTaskId(currentId, newId)`334- **Row expand/collapse:** `expandByID()`, `expandByIndex()`, `collapseByID()`, `collapseByIndex()`335- **Split/Merge:** `splitTask(taskId, splitDate)`, `mergeTask(taskId, segmentIndexes)`336- **Predecessor:** `removePredecessor(id)`337- **Querying:** `getRecordByID(id)`, `getRecordByIndex()`, `getTaskByUniqueID(id)`, `getTaskInfo(taskId)`, `getCurrentViewData()`, `getExpandedRecords(records)`, `getCriticalTasks()`338- **DOM access:** `getRowByID(id)`, `getRowByIndex(index)`, `getTaskbarHeight()`339- **Formatting helpers:** `getDurationString(duration, unit)`, `getWorkString(work, unit)`340- **Scroll:** `scrollToTask(taskId)`, `setScrollTop(scrollTop)`, `updateChartScrollOffset(left, top)`341- **Data:** `updateDataSource(dataSource, args)`342- **Sort:** `removeSortColumn(columnName)`343- **Selection:** `selectCells(rowCellIndexes)` — requires `selectionSettings.mode: 'Cell'`344345### Context Menu346📄 **Read:** [references/context-menu.md](references/context-menu.md)347- Inject `ContextMenu`, `Edit`, `Sort`, `Resize`, `Selection` modules348- Enable: `enableContextMenu: true`, `allowSorting: true`, `allowResizing: true`349- Default built-in items table: `AutoFit`, `AutoFitAll`, `SortAscending`, `SortDescending`, `TaskInformation`, `Add`, `Indent`, `Outdent`, `DeleteTask`, `Save`, `Cancel`, `DeleteDependency`, `Convert`350- Custom items: mix built-in strings + descriptor objects `{ text, id, target, iconCss }`351- `target: '.e-content'` restricts item to row right-click; `target: '.e-gridheader'` to header352- `contextMenuClick` event — handle custom actions via `args.item.id`353- `contextMenuOpen` event — hide items dynamically via `args.hideItems`; check `args.type !== 'Header'`354- Touch: long press on a row to open context menu355356### Critical Path357📄 **Read:** [references/critical-path.md](references/critical-path.md)358- Enabling critical path (`enableCriticalPath`, inject `CriticalPath`)359- Toolbar toggle button (`'CriticalPath'`)360- Customizing critical taskbar colors via `queryTaskbarInfo`361- `data.isCritical` and `data.slack` properties362- Near-critical task detection using slack time363364### Timezone and Globalization365📄 **Read:** [references/timezone-and-globalization.md](references/timezone-and-globalization.md)366- `timezone` — IANA string (e.g. `'UTC'`, `'America/New_York'`) applied at render time367- `timezone: 'UTC'` — display same times for all users regardless of local clock368- Hourly timeline: combine `timezone` + `durationUnit: 'Hour'` + `dateFormat: 'hh:mm a'` + bottom tier `unit: 'Hour'`369- CRUD with timezone: edits operate in configured timezone; `actionComplete` receives local-time-reversed date for DB persistence370- `args.data.ganttProperties.endDate` in `actionComplete` — post-edit value already converted back to local time371- `Timezone` class (`@syncfusion/ej2-base`) — manual timezone arithmetic372- `timezone.offset(date, tz)` → offset in minutes from UTC373- `timezone.convert(date, fromOffset, toOffset)` → date in target timezone (IANA or numeric)374- `timezone.remove(date, tz)` → strips offset, returns wall-clock time as plain date375- Locale and globalization (`locale`, `L10n.load()`)376- RTL support (`enableRtl: true` + locale strings)377- Date format configuration on columns (`format: 'dd/MM/yyyy'` or `'yMd'`)378- `currencyCode` — set currency for monetary columns379380---381382## Quick Start (Vue 3 — Composition API)383384```bash385npm install @syncfusion/ej2-vue-gantt --save386```387388```vue389<template>390 <ejs-gantt391 id="gantt"392 :dataSource="data"393 :taskFields="taskFields"394 height="450px"395 ></ejs-gantt>396</template>397398<script setup>399import { GanttComponent as EjsGantt } from '@syncfusion/ej2-vue-gantt';400401const data = [402 { TaskID: 1, TaskName: 'Planning', StartDate: new Date('04/02/2019'), EndDate: new Date('04/06/2019'), ParentID: null },403 { TaskID: 2, TaskName: 'Identify location', StartDate: new Date('04/02/2019'), Duration: 4, Progress: 50, ParentID: 1 },404 { TaskID: 3, TaskName: 'Perform soil test', StartDate: new Date('04/02/2019'), Duration: 4, Progress: 50, ParentID: 1 },405];406407const taskFields = {408 id: 'TaskID',409 name: 'TaskName',410 startDate: 'StartDate',411 endDate: 'EndDate',412 duration: 'Duration',413 progress: 'Progress',414 parentID: 'ParentID'415};416</script>417418<style>419@import "../node_modules/@syncfusion/ej2-tailwind3-theme/styles/gantt/index.css";420</style>421```422423## Quick Start (Vue 3 — Options API)424425```vue426<script>427import { GanttComponent, Edit, Filter, Sort, Toolbar, Selection, DayMarkers } from '@syncfusion/ej2-vue-gantt';428429export default {430 name: 'App',431 components: { 'ejs-gantt': GanttComponent },432 data() {433 return {434 data: [...],435 taskFields: { id: 'TaskID', name: 'TaskName', startDate: 'StartDate', duration: 'Duration', progress: 'Progress', parentID: 'ParentID' },436 toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'ExpandAll', 'CollapseAll'],437 editSettings: { allowAdding: true, allowEditing: true, allowDeleting: true, allowTaskbarEditing: true }438 };439 },440 provide: {441 gantt: [Edit, Filter, Sort, Toolbar, Selection, DayMarkers]442 }443};444</script>445```446447## Common Patterns448449### Pattern 1 — Inject Only What You Use450451Features in the Gantt Chart require explicit module injection. Only inject modules for features you enable to keep bundle size lean:452453```js454// Composition API (Vue 3)455import { provide } from 'vue';456import { Edit, Filter, Sort, Toolbar } from '@syncfusion/ej2-vue-gantt';457provide('gantt', [Edit, Filter, Sort, Toolbar]);458459// Options API460provide: { gantt: [Edit, Filter, Sort, Toolbar] }461```462463### Pattern 2 — Self-Referential vs Hierarchical Data464465```js466// Self-referential (flat array with ParentID — recommended for CRUD)467taskFields: { id: 'TaskID', name: 'TaskName', startDate: 'StartDate', duration: 'Duration', parentID: 'ParentID' }468469// Hierarchical (nested subtasks array)470taskFields: { id: 'TaskID', name: 'TaskName', startDate: 'StartDate', duration: 'Duration', child: 'subtasks' }471```472473### Pattern 3 — Full-Featured Gantt474475```vue476<ejs-gantt477 :dataSource="data"478 :taskFields="taskFields"479 :editSettings="editSettings"480 :toolbar="toolbar"481 :allowFiltering="true"482 :allowSorting="true"483 :splitterSettings="{ columnIndex: 2 }"484 :timelineSettings="{ topTier: { unit: 'Week' }, bottomTier: { unit: 'Day' } }"485 height="500px"486></ejs-gantt>487```488489## Key Props Reference490491| Prop | Type | Purpose |492|---|---|---|493| `dataSource` | Array / DataManager | Task data |494| `taskFields` | Object | Maps data fields to Gantt fields |495| `height` | String | Component height (e.g., `'450px'`) |496| `toolbar` | Array | Toolbar item names or custom item objects |497| `editSettings` | Object | Controls which edit operations are allowed |498| `allowFiltering` | Boolean | Enables column filter menu |499| `allowSorting` | Boolean | Enables column header sorting |500| `timelineSettings` | Object | Top/bottom tier units and format |501| `splitterSettings` | Object | Grid/chart panel width split |502| `labelSettings` | Object | Left, right, and task label fields |503| `resources` | Array | Resource collection |504| `resourceFields` | Object | Maps resource id/name fields |505| `eventMarkers` | Array | Vertical marker lines with labels |506| `holidays` | Array | Non-working day definitions |507| `projectStartDate` | Date | Explicit project start |508| `projectEndDate` | Date | Explicit project end |509| `enableVirtualization` | Boolean | Virtual row rendering for large data |510| `enableCriticalPath` | Boolean | Highlights critical path tasks |511| `baselineTemplate` | function/string | Custom baseline rendering for planned schedules and advanced baseline layouts |512| `enableInfiniteTimelineScroll` | boolean | Enable infinite horizontal timeline scrolling by extending the visible range as the user navigates |513