How to configure the Item Colors

Modified on Wed, 6 Mar at 5:18 PM

Changing colors depends on your use case and needs.


Static Colors

You may NOT want the item colors to present the schedule-status, i.e. you do not want to highlight that the item is delayed, overdue, …), but you want to have the colors defined on the server.


 In such case add to Widget Properties > Advanced >Gantt Config Script:

gantt.config.show_progress_colors=false;

and to Widget properties > Advanced > Item Script

if(wi.type.id==='portfolioepic'){ 
     task.color= "#bfbfbf";
}

(of course adjust the actual color, and define your color mapping.



NOTE! 

From Polarion 2304 and related changes in the scripting engine, the script format must be changed to the one below:

if(wi.getType().getId()==="workpackage" && wi.getStatus().getId()==="draft") {
task.color= "#bfbfbf";
}



Dynamic Colors

Or maybe you want to keep the schedule-status colors, but you want to change the default colors to be based on some conditions.  So you want to highlight overdue, progressdue, resolved taks, but you dislike the colors. Or you want to change the default (blue) color.


Add to  Widget Properties > Advanced >Gantt Config Script 


gantt.config.progress_color_overdue= "red"; // end date is in the past
gantt.config.progress_color_progressdue="orange"; // progress date is in the past
gantt.config.progress_color_resolved = "gray"; / /task is resolved 


and  to Widget properties > Advanced > Item Script


(beware - compared to static coloring, now the .taskColor is used to change the default blue color)

if(wi.type.id==='portfolioepic'){    
     task.taskColor= "#bfbfbf";
}


Honestly, it is a bit complicated, and we will simplify it in future releases.


Color Defaults

You can also set the default status colors  in Global or Project settings. 

Go to ( Project | Global ) Administration > Configuration Properties and change (add)  there:


nextedy.gantt.default.progress_color_overdue=red

nextedy.gantt.default.progress_color_progressdue=orange

nextedy.gantt.default.progress_color_resolved=gray

nextedy.gantt.workitems.unplanned_color=#c7cffb

nextedy.gantt.workitems.unplanned_color_fg=#001379



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article