3 Replies Latest reply: Jul 31, 2013 2:37 PM by Alexandra Robin RSS

    Charts - Dynamically setting Y-axis Maximum


      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 y-axis...so that is not part of this issue.)

      Please assist if you can,