Skip to main content
Configure the Gantt Config Script in Widget Parameters > Advanced > Gantt Config Script.

Execution Context

The Gantt Config Script runs once during chart initialization on the client side. It has access to the gantt object and its configuration properties.
diagram
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 setting gantt.config.* properties:

Interaction Properties

Display Properties

Custom Working Hours Function

Define per-resource working hours:
The Gantt Config Script supports Velocity expressions ($project, $user, $trackerService). Velocity runs on the server before the script reaches the client. Use this to dynamically build script content based on Polarion data.

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 Progress Dragging

Enable Static Coloring

Disable dynamic progress-based colors to use only task.color values set in the Item Script:

Combined Example

REST API Endpoints

The Gantt chart communicates with the server via these REST API endpoints:
All Gantt API endpoints require Polarion user authentication. Anonymous access is not supported.

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:
Last modified on July 10, 2026