Task Bars
Use gantt.visuals to customize task bars. The example uses a different color for Backend setup and adds markers to tasks with a deadline.
grid.gantt = { ...project, visuals: { showTaskLabels: 'tasks', taskLabelPlacement: 'auto', taskBarColorHook: ({ row }) => row.id === 'backend' ? { barColor: '#64748b' } : undefined, taskMarkerHook: (task) => task.deadlineDate ? [ { id: `deadline-${task.id}`, date: task.deadlineDate, label: 'Deadline', }, ] : [], },};- Set
showTaskLabelsto'tasks'for task and milestone labels,'all'to include summaries, orfalseto hide labels. SettaskLabelPlacementto'inside','outside', or'auto'for regular tasks. - Use
taskBarContentto customize label content while retaining the built-in progress, resize, and dependency controls. The legacytaskBarContentHooktakes precedence when both are supplied. - Set
visuals.showInteractionShadowtofalseto hide the snapped destination shadow during task moves and resizes. It is visible by default. - Use Task Tooltips to configure the detail shown on hover and Actuals and Progress to configure the task-table progress display.