7 Replies Latest reply on Aug 2, 2013 6:50 PM by user13754052

    Y axis errors for apex 4.0 bar chart

      I created a 2d stacking bar chart for the following query. The chart shows 1 1 2 2 3 on the y axis of the bar chart.
      This strikes me as wrong. It appears Apex does not like doing charts for small values. :)

      select null link, 1 time, 1 "sts1", 1 "sts2" from dual
      select null link, 2 time, 0 "sts1", 2 "sts2" from dual
      select null link, 3 time, 1 "sts1", 0 "sts2" from dual

      If I change even one of the values to 5, then everything works fine.

      Any thoughts appreciated.

      Any thoughts such as "don't use labels" not appreciated so much.
        • 1. Re: Y axis errors for apex 4.0 bar chart
          I have created an example to illustrate this issue at:


          The query is :

          select null link,'Test' label ,1 value_1 ,2 value_2 from dual

          Edited by: rjoffe on Aug 13, 2010 12:24 PM
          • 3. Re: Y axis errors for apex 4.0 bar chart
            Hilary Farrell-Oracle
            Hi (please update your profile with a name, thanks),

            You can control the values displayed on the Y-Axis by updating your Chart Attributes and setting the following:

            <li> In the Display Settings region, set "Show Grid" to either Y-Axis or Both </li>
            <li> In the Axes Settings region, set "Y-Axis: Major Interval" to 1. </li>

            When the interval is not defined, it is automatically calculated by AnyChart automatically. The major interval setting is an attribute of the grid, and therefore the grid axis in question, in this case the Y-Axis, must be shown in order to apply the interval settings. These settings have been applied to this sample 2D Stacked Bar Chart on apex.oracle.com: http://apex.oracle.com/pls/apex/f?p=36648:18

            • 4. Re: Y axis errors for apex 4.0 bar chart
              Hilary Farrell-Oracle
              Hi rjoffe,

              No, this question isn't related to the dial chart issue reported on thread Re: apex 4 - strange problem with dial chart As I've mentioned in my previous posting, the setting of the Y-axis interval is controlled via the items on the Axes Settings region of the Chart Attributes page.

              • 5. Re: Y axis errors for apex 4.0 bar chart

                Thanks for the reply.

                The bar chart we are trying to display has values that range from 0-200. Above 5 everything displays properly and the chart auto ranges the axes as required. Below a value of 5 we end up with the example I produced.

                If I set the axes to a major = 1 the display is not pretty when we have values > 20 or so. Our chart is dynamic so I really need a solution that works properly between 0-200.

                Any other workarounds would be greatly appreciated.


                • 6. Re: Y axis errors for apex 4.0 bar chart - insight: Y values are truncated
                  Howard (... in Training)
                  I know this is a really old question but ...

                  I thought I'd provide a little insight since I had the same problem. If, as in the case described, the values are specified to have 0 decimal places, and the range of the data is, say, between 0 and a small number then the Y scale/range may be 1.0, 1.5, 2.0, 2.5, 3.0, ... But at 1 decimal place, these may display (truncated?/rounded) as 1, 1, 2, 2, 3, ...

                  The easy solution would be to specify 1 (or more) decimal places in the chart. However, the easy solution has other effects. My stacked bar chart was very dense with only enough room (enough width in the bar) to show a single digit for the Values. This became unreadable when the value 1 (one) was replaced by 1.2 and 2 by 2.3 as the displayed value was wider than the bar and they all ran together. So I unchecked to display Values. (Why couldn't the values display staggered like labels do so they they don't overlap?)

                  So even though, I had intended to display "values," I had to give that up when I specified additional decimals in the labels.

                  • 7. Re: Y axis errors for apex 4.0 bar chart

                    Thanks Hilary. It was helpful for me today.