This discussion is archived
3 Replies Latest reply: Jul 31, 2013 12:37 PM by Alexandra Robin RSS

Charts - Dynamically setting Y-axis Maximum

571043 Explorer
Currently Being Moderated

I'm using apex 4.0. I'm trying to dynamically set the maximum y-axis value in a bar chart as shown. I'm pre-calculating a value that contains the total of all the rows (P280_Y_AXIS_MAX), and I need that value to always be the maximum y-axis value in my chart. Hard-coding the value works just fine, and I get the results I expect in my graph. However, since the data will change, I need the graph to as well. When I try to use a substitution variable ( &P280_Y_AXIS_MAX.), the graph gets stuck on "initializing...." and never displays.
          <y_axis >
            <scale   mode="Normal" maximum="&P280_Y_AXIS_MAX." minimum="0"/>
The reason for this is that I have a second series on the same chart showing a running percentage that each data value contributes, adding up to 100%. If the first data set (controlled by the above y-axis) doesn't range exactly from 0 to it's maximum value, the visual representations will appaer to disagree. (I already have the multiple y-axis calculating properly, and the different series corresponding to their proper that is not part of this issue.)

Please assist if you can,



  • Correct Answers - 10 points
  • Helpful Answers - 5 points