IGanttTaskMapping Interface
Defines property field mapping overrides for task objects rendered on the timeline in KGantt.
Configure custom field mappings when task objects use non-default property names.
const customTaskMapping: IGanttTaskMapping = {
id: 'taskId',
startDate: 'start_at',
endDate: 'finish_at',
title: 'name',
color: 'badgeColor',
appearance: 'styleVariant'
}Available mapping keys on IGanttTaskMapping.
| Property | Type | Default | Description |
|---|
| id | string | 'id' | Task unique identifier field |
| startDate | string | 'startDate' | Task starting timeline point or date field |
| endDate | string | 'endDate' | Task ending timeline point or date field |
| title | string | 'title' | Task bar display text field |
| color | string | 'color' | Task bar custom hex/CSS color field |
| appearance | 'filled' | 'bordered' | 'dashed' | 'shaded' | 'filled' | Task bar visual style variant field |
| type | string | 'type' | Task type field for resource placement rules |
| tasks | string | 'tasks' | Property on resource rows containing the task array |