Execution Context
The Gantt Config Script runs once during chart initialization on the client side. It has access to thegantt object and its configuration properties.
The Gantt Config Script executes before the chart renders data. Modifications to
gantt.config and gantt.templates take effect on the initial render. To apply changes after initialization, call gantt.render().Configuration Properties (gantt.config)
Control Gantt behavior by settinggantt.config.* properties:
Interaction Properties
Display Properties
Custom Working Hours Function
Define per-resource working hours:Template Functions (gantt.templates)
Override rendering templates to customize how task elements display:Right-Side Text
Display custom text to the right of each task bar:Right-Side Text with Status Icon
Status Icon Only
Template functions access data prepared by the Item Script via
task.fields.*. Prepare your data in the Item Script using task.getFields().put(KEY, VALUE), then reference it in templates as task.fields.KEY.Common Configuration Patterns
Disable Dependency Link Creation
Disable Progress Dragging
Enable Static Coloring
Disable dynamic progress-based colors to use onlytask.color values set in the Item Script:
Combined Example
REST API Endpoints
The Gantt chart communicates with the server via these REST API endpoints:Error Handling
- Script errors display as a warning indicator with a count badge in the Gantt toolbar
- Config Script Error: prefix identifies errors from this script
- Markers Script Error: prefix identifies errors from the markers script
- Item Script Error: prefix identifies errors from the Item Script
- Errors appear in both view mode and wiki editor mode with different messages
Configuration Example
A complete Gantt Config Script for a project tracking view:Related Pages
- Item Script API — server-side script for data preparation
- Velocity Context Variables — server-side variables for dynamic script generation
- Item Color Legend — how
show_progress_colorsaffects task colors - Default Configuration Values — server-level property defaults
- Dependency Types Reference — advanced dependency link types