Where to Add Marker Scripts
Open your Gantt widget parameters, expand the Advanced section, and locate the Markers Script field. All marker scripts go here. The script has access tomarkerFactory, trackerService, and config objects.
Marker Factory API
ThemarkerFactory object provides these methods:
The marker object returned by
addMarker() has these setter methods:
Add a Manual Marker
Create a fixed marker at a specific date:Add Markers from Plans
Automatically generate markers from Polarion plan boundaries (iterations, sprints):config.getContextProjectId() instead of a hardcoded project ID:
Add Markers from Work Items
Generate markers from work items of a specific type using a date field:"publicLaunch") specifies which date field on the work item provides the marker date.
Use Polarion API for Dynamic Markers
For full scripting control, usetrackerService to query work items and create markers programmatically. This example loads Polarion project time points:
Filter Markers with Page Parameters
Use page parameters to let users control which markers appear. This example reads amilestone page parameter and renders matching work items as markers:
Marker Styling
Markers automatically receive CSS classes based on their source:
Hovering over a marker displays a tooltip showing the marker name and due date.
Handle Script Errors
If the Markers Script contains errors, the Gantt chart displays a warning indicator in the footer with the prefix Markers Script Error:. Check the browser console for details. See Debug Script Errors for systematic debugging.Verify Your Changes
Save the page and reload the Gantt chart. You should now see vertical marker lines on the timeline at the specified dates, with labels and colors matching your script configuration. Hover over markers to confirm tooltip text displays correctly.See Also
- Create and Configure Markers for marker visualization options
- Write Page Scripts with Velocity for server-side Velocity scripting
- Configure Page Parameters for dynamic parameter-based filtering
- Debug Script Errors for troubleshooting marker script issues