Prerequisites
Before configuring marker colors, ensure the resource view is enabled on your Gantt widget. Navigate to Widget Properties > Resource View and set Show Resource View to Yes.Step 1: Understand the Default Colors
The Gantt resource view uses color-coded markers in each time cell to communicate allocation status at a glance. The default colors are:| Allocation State | Default Color | Meaning |
|---|---|---|
Within capacity (marker_ok) | Green (#4CAF50) | Resource workload is at or below available hours |
Over-allocated (marker_over) | Red/Orange | Resource workload exceeds available hours |
Step 2: Configure Colors via resourceMarkersColorConfig
You can override the default marker colors by providing a custom resourceMarkersColorConfig object. This configuration accepts ok and over properties defining CSS color values.
Add the following to Widget Properties > Advanced > Gantt Config Script:
Step 3: Configure Multi-Threshold Colors
For more granular color coding, you can define multiple color thresholds using thecolors and percentages arrays. The percentages array defines breakpoints (in ascending order), and the colors array defines the color for each range.
- 0-50% allocation: Green (
#4CAF50) - 50-100% allocation: Orange (
#FB8C00) - Over 100% allocation: Red (
#E53935)
Step 4: Apply Colors Globally via Configuration Properties
To set default marker colors across all Gantt widgets in your project, navigate to Administration > Configuration Properties and define the color configuration there rather than in individual widget scripts.How Resource Load Modes Affect Markers
The marker display varies depending on the configuredresourceLoadMode:
| Load Mode | Marker Shows | Color Trigger |
|---|---|---|
num | Task count per resource per day | Exceeds item threshold |
time | Allocated hours per day | Exceeds available working hours |
remaining | Remaining capacity (hours) | Negative value (overallocation) |
allocation | Percentage of capacity used | Exceeds 100% |
Verification
You should now see color-coded resource allocation markers in the resource view below the Gantt chart. Within-capacity cells display in your configuredok color, and over-allocated cells display in your configured over color. If you used multi-threshold colors, intermediate allocation levels display the corresponding middle color.
If you see a validation error instead of colored markers, verify that your colors array has exactly one more element than your percentages array and that percentages are in ascending order.
See Also
- Set Up the Resource View
- Configure Item Colors
- Customize Progress-Related Coloring
- Mark Tasks Without Resource Allocation
Sources
Sources
KB Articles
- Item Color Legend
- How to configure the Item Colors
- Customizing Progress-Related Coloring in the Gantt Chart
prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/config.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/default.jsonprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/view/markersStyles.cy.tsprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/view/resourceAllocation.cy.tsprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/Aresource-view/ganttMarkersColorConfigValidation.cy.ts