Project and Portfolio Management Practitioners Forum
cancel

defining cell background color of a portlet

Highlighted
eata
Super Contributor.

defining cell background color of a portlet

Hi;

I want to change background of a cell according to value on the cell.

I managed to change background of text but I could not change cell background neither by java script not by html.

 

Here my old query on data source:

SELECT T1.BUSINESSUNITID BUSINESSUNITID, T1.BUSINESSUNIT BUSINESSUNIT,  sum(T1.ACTUALEFFORT)

ACTUALEFFORT

 

here my new query:

SELECT T1.BUSINESSUNITID BUSINESSUNITID, T1.BUSINESSUNIT BUSINESSUNIT,

case WHEN sum(T1.ACTUALEFFORT) <= 100 THEN '<span style="background-color: #FFFF00">' else '<span style="background-color: #00FFFF">' end ||sum(T1.ACTUALEFFORT)||'</span>'

 

but this changes background color of text, not the cell.

Here is screen shot:

 

 

What I desere is:

Is there any way to do this?

1 REPLY
eata
Super Contributor.

Re: defining cell background color of a portlet

Again I solved my own problem.

Using Division I managed to change:

case WHEN sum(T1.ACTUALEFFORT) <= 100 THEN '<div style="background-color: #FFFF00">' else '<div style="background-color: #00FFFF">' end ||sum(T1.ACTUALEFFORT)||'</div>'