Access the Markers Script
Markers are defined in the Markers Script, located under Widget Properties > Advanced > Markers Script. This server-side script runs each time the Gantt loads and produces the set of marker lines displayed on the timeline.
markerFactory object, which provides methods for creating markers manually and from Polarion data.
Add a Marker Manually
To create a single marker at a specific date, use themarkerFactory.addMarker() method:

Add Markers from Plans
UseaddPlanMarkers to automatically create markers from Polarion Plan items matching a Lucene query:
Add Markers from Work Items
UseaddWorkItemMarkers to create markers from work items, specifying which date field to use:


Use the Polarion API for Dynamic Markers
For full scripting control, use thetrackerService API to query Polarion data and build markers dynamically. This approach supports conditional logic, custom tooltips, and color-coding based on field values.
Example: Load Time Points as markers:


releaseDate (a date) and productType (an enumeration with values such as typeA, typeB, and typeC).


milestone.

milestone page parameter, queries them, and renders each as a marker. Changing the page parameter updates which markers appear without editing the script.
As a result, only the selected work items appear as markers, dated from their releaseDate field. Milestones 1 and 3 appear blue because their productType has a value, while Milestone 2 is pink because its productType is typeB.



milestone parameter there.


Marker CSS Classes
Markers receive CSS classes based on their type, which you can use for custom styling:
To keep only the marker line and hide its header label, add a script-block widget above the Gantt that sets
.gantt_marker_content { display: none; }. The result shows the marker line without its text header.

Marker Tooltips
Hovering over a marker line displays a tooltip showing the marker name and date. Set the tooltip content usingmarker.setTitle() for custom tooltip text, or let the Gantt generate a default tooltip from the marker text and date.
