Default Text Rendering
By default, each task bar displays the work item ID and title as its label (thetext property). The task bar also renders a progress fill bar showing the completion percentage. Optionally, a right-side text label can display additional information such as status or remaining estimate.
| Text Element | Position | Default Content |
|---|---|---|
| Task label | Inside the task bar | Work item ID + title |
| Progress bar | Inside the task bar (filled portion) | Percentage of completion |
| Right-side text | To the right of the task bar | Configurable (status, estimate, custom field) |
Step 1: Configure Right-Side Text
The right-side text displays a label to the right of each task bar. Configure it using therightside_text template in the Gantt Config Script:
Step 2: Adjust Right-Side Text Styling
To customize the appearance (color, font size, position) of the right-side text, add a Script block widget to the page containing your Gantt chart with the following CSS:- Positioning: Adjust the
topandbottomvalues to control vertical alignment relative to the task bar. - Appearance: Set
colorandfont-sizeto match your visual preferences.
Step 3: Adjust Task Bar and Row Height for Text Visibility
If text appears crowded inside task bars, increase the row and task heights. Add the following to the Gantt Config Script:Step 4: Populate Custom Fields for Display
To show custom work item fields in the task bar text or right-side labels, first extract them in the Item Script:task.fields.remainingEstimate or task.fields.priorityLabel.
Verification
You should now see your customized text labels inside and alongside task bars in the Gantt chart. Right-side text displays the fields you configured, styled with your CSS customizations. Task bars show the work item label and a proportional progress fill.See Also
- Configure Right-Side Text on Task Bars
- Write Item Scripts
- Write Gantt Config Scripts
- Use Square Task Borders
- Adjust Gantt Row Height
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Config.javaprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/taskline/rightside-text.cy.tsprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Task.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidgetConfig.javaprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/main.js