Oracle JET Charts - Series Bar Chart with Zero Value Bars

Oracle JET Charts is a beautiful chart library which has out-of-box support in Oracle APEX version 5 on-wards. Purpose of this blog is to introduce with a small tweak in Series Bar Chart.

Problem

When you use Series Bar Chart and if you have some series with NULL or ZERO value, the bar will not appear at all. This is correct behavior from the Charting way, but visually - you may find it difficult to detect the bar against a series.

Below is a sample bar chart with ZERO values where you can see gaps between.


Below is same bar chart but fixed the gap with very small bar where the value is ZERO.



Solution

  • Inside your series bar chart, you will find Axes, and select "Y"
  • Change following options:
    • Format = "Decimal"
    • Decimal Places = 0
    • Step = 1

Hope this helps!

Regards,
Jaydip Bosamiya
jbosamiya@gmail.com

Comments

  1. Nice, I also like the fact this is a declarative solution.

    ReplyDelete
    Replies
    1. Though I just went to use this, and it no longer appears to be taking effect? Neither on 18.2, nor your example on 19.2

      Delete
    2. Hello Scott, the example demo is working fine for me. Can you please prepare your implemented example and let me know so that I can suggest you the fix? If you can also try by adding 0.1 to your zero values should fix it.

      Delete
    3. Interesting - it seems to be a browser based issue. I see the zero in Firefox, IE, barely in Edge, but not Chrome.

      Delete
    4. I think you are right, I quickly checked in Edge & IE and it does not show the zero value bars. This must cross browser issue. Good catch. I hope it is working fine with Chrome (tested) & Safari (not tested) but not working as expected in Edge & IE (tested). Thank you again for bringing this out.

      Delete

Post a Comment

My photo
Jaydip Bosamiya
I am Oracle APEX Consultant, Blogger and Integrator. All-rounder in building small, medium and enterprise applications. Extensive knowledge in various area of web-driven applications in Back-end (PL/SQL, SQL, Java), Front-end (Oracle APEX, HTML, JavaScript, CSS, jQuery, OracleJET, ReactJS), RESTful APIs, Third-party library integrations (Apex Office Print (AOP), Payment Gateways, Syncfusion, HighCharts) and APEX Plugins (HighChart, StarRating)

Popular posts from this blog

Oracle APEX - Interactive Report - Scrollbars on Top

How to create your own customized nested report regions using jQuery

Oracle APEX - Build Your Own Enhanced Nested Report