Two-Tier Architecture
The Gantt chart operates as a client-server system within Polarion. The server tier is a Java plugin that runs inside the Polarion application server. It handles data retrieval, field mapping, calendar resolution, and persistence. The client tier is a JavaScript application that renders the interactive chart in the browser, manages user interactions (drag, resize, lightbox editing), and communicates changes back to the server. Think of it like a spreadsheet application: the server is the database that stores and validates data, while the client is the visual interface where you interact with it.Data Loading Sequence
When a Polarion page containing a Gantt chart loads, the following sequence occurs:- Initialization — The server reads chart parameters (data source, field mappings, calendar settings) and resolves the configuration into a typed configuration object
- Data retrieval — The server queries Polarion for work items matching the configured dataset, resolves parent-child relationships using the configured
parentRoles, and builds dependency links fromdependsRoles - Task conversion — Each work item is converted into a task object with properties like
start_date,end_date,duration,progress,parent, andtype. Custom fields listed in the field filter are included as additional fields - Calendar resolution — If working calendars are enabled (
wCal_GLOBAL), the server computes working hours per day for each resource, including user calendars and team assignments - JSON serialization — The complete dataset (tasks, links, resource collections, and load statistics) is serialized to JSON and sent to the client
- Client rendering — The JavaScript application parses the JSON, applies the configuration, and renders the Gantt chart with its grid, timeline, and optional resource view
The Data Payload
The server returns a structured JSON payload containing four key sections:| Section | Content | Purpose |
|---|---|---|
data | Array of task objects | Work items or plan items to display as task bars |
links | Array of link objects | Dependency relationships (FS, SS, FF, SF) between tasks |
collections | Map with resources and loadInfo | Resource definitions and capacity metadata for the resource view |
| Load statistics | Item counts, errors, server load time | Footer status bar showing what was loaded and any issues |
Configuration Flow
Configuration reaches the Gantt through two channels, each with a different scope:- Per-instance parameters are set on each Gantt chart through the Polarion page editor. They control data source, field mappings, visual options, and feature toggles for that specific chart. Examples:
Start Field,End Field,Parent Role,Show Resource View. - Administration properties are set globally via Polarion Configuration Properties (
nextedy.gantt.*). They control system-wide behavior like auto-scheduling defaults, calendar project references, and license caching. Examples:nextedy.gantt.default.auto_scheduling,nextedy.gantt.workitemCalendar.projectId.
Persistence Model
Nextedy GANTT uses an optimistic persistence model. When you drag a task bar, resize it, or edit fields in the lightbox, the changes are staged locally in the browser. A modified indicator appears on affected tasks. Changes are only written back to Polarion when you click Save in the toolbar. The save operation sends each modified task to the server, which updates the corresponding Polarion work item fields:startField, endField, durationField, progressField, resourceField, and any custom fields from the field filter. Dependency link changes (add or remove) update Polarion work item link roles.
Scripting Extension Points
Nextedy GANTT provides two server-side scripting hooks for customization:- Item Script — Executes on the server for each work item during data loading. The script receives the source work item object and the task object being built, allowing you to read additional fields and pass custom data to the client. This is commonly used for custom color logic, computed labels, or baseline date injection.
- Page Script — Executes once during page rendering, providing access to the full Gantt configuration and Polarion page context. Used for dynamic configuration adjustments.
Related Topics
- Product Overview — High-level introduction to Nextedy GANTT capabilities and use cases
- Data Mapping and Field Resolution — How work item fields connect to Gantt scheduling properties
- Working Calendars and Scheduling — How calendar data is resolved and sent to the client
- Item Color Logic — Static, Dynamic, and Progress Colors — How Item Script customizes task appearance
Sources
Sources
KB ArticlesSource Code
prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidget.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidgetConfig.javaprod-gantt-src/com.nextedy.polarion.gantt/src/META-INF/hivemodule.xmlprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/types/TypeConfigWidgetParameters.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Data.java