Evaluate Consulting Services

Oracle APEX Chart Conditional Bar Colors


 Here I am giving an example to change the chart bar colors based on the conditions in Oracle APEX.

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 fund_id, 


       to_char(start_date,‘DD-Mon-RRRR’) start_date, 

       case when percent_complete >= 75 then ‘#d1f5e0’ –light green

            when percent_complete >= 50 then ‘#fff4dd’ –light orange

            when percent_complete <= 50 then ‘#fdd5cc’ –light red

       else ‘blue’

        end as color,


FROM fxgn_fund_progress order by fund_id ASC

Step 3: Do the column mappings. (Label and Value must be mapped)

Once you done the above setup, then your bar chart would then look like this,

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. 

Output: Output would then look like this,

That’s it. I hope this example will help you to understand how colors of the chart bars can be changed based on the conditions. 

Happy APEXing!!!…

Leave a Comment

Your email address will not be published. Required fields are marked *