This page covers the scripting API at a high level. Verify specific script syntax and available variables in the Gantt application and Reference documentation.
What types of scripts does Gantt support?
Nextedy GANTT supports two types of scripts: item scripts and page scripts. Item scripts run against individual tasks and can modify their appearance, such as changing task bar colors or adding markers. Page scripts run once when the Gantt chart loads and can modify global behavior, configuration, and register custom editors or markers.What can I do with item scripts?
Item scripts allow you to customize individual task bars based on work item properties. Common use cases include applying conditional color coding based on status or priority, adding visual markers to specific tasks, and modifying task labels. Item scripts execute on the server side with access to the task data and Polarion work item fields.What can I do with page scripts?
Page scripts run at page load time and provide access to the Gantt configuration, editor registry, and marker utilities. You can use page scripts to register custom column editors, add timeline markers (such as milestone dates or sprint boundaries), and modify configuration values before the Gantt chart initializes.| Script Type | Runs | Scope | Common Use Cases |
|---|---|---|---|
| Item script | Per task | Individual task bar | Color coding, markers, label customization |
| Page script | Once at load | Entire Gantt chart | Custom editors, timeline markers, config overrides |
How do I add custom markers to the Gantt timeline?
Page scripts can add custom vertical line markers to the Gantt timeline using the marker utilities exposed through the scripting API. Markers are commonly used to indicate today’s date, milestone deadlines, sprint boundaries, or plan due dates. The “Today” marker is built in and displayed by default.Check the scripting reference for the exact API to add custom markers, including available styling options.
Can I customize task bar colors using scripts?
Yes, item scripts are the primary mechanism for applying conditional task bar colors. You can write logic that reads work item fields (such as status, priority, or a custom field) and returns a CSS color value to apply to the task bar. This lets you visually distinguish different categories of work items on the Gantt chart.Can I register custom column editors via scripts?
Yes, page scripts can register custom inline column editors through the editor registry. These custom editors appear in the Gantt grid columns and allow users to edit task fields using specialized input controls beyond the default text and date editors.Custom editor registration must occur before the Gantt chart initializes. Refer to the scripting reference for the editor registration API.