Oracle APEX Bar Chart Colors (Conditional)

Step 1: Create a new blank page.

Step 2: Create a bar chart region and your bar chart series query would then look something like this,
—————————————————————————————
select
null,STATUS as STATUS,
case when STATUS = ‘VACANT’ then ‘#d1f5e0’ –light green
when STATUS = ‘ALLOCATED’ then ‘#fff4dd’ –light orange
when STATUS = ‘MAINTENANCE’ then ‘#fdd5cc’ –light red
else ‘blue’
end as color,
count(STATUS)
from ROOM_INFO where BUILDING_NAME=’20J’ group by STATUS
————————————————————————————-
Step 3: Do the column mappings. (Label and Value must be mapped)
Step 4: [Enable Conditional Bar Colors] 
Click on the chart series and look for the attribute “Color” (Which you could find under the option “Appearance”) and Substituting your value using the syntax &COLUMN_NAME.
Get in touch with us: https://www.facebook.com/codeteaching

Comments