If you have your own Java function for calculation of chart max value based on max value in data then

  1. Find max value in data – you have to create variable in report:
    • data type same as y-axis values
    • calculation – Highest
    • expression – your y-axis value
    • increment – none
    • reset type – depends on the whole design
      • “Report” if you have
        • only simple report with one chart,
        • or you want to set the same max value for all charts
      • “Group + group name” if you group data for generation of more charts and you want to have its own maximum for every chart
  2. Use this variable in chart together with your Java function as advanced property like this:
    <hc:chartProperty name="yAxis.max">
    <hc:propertyExpression><![CDATA[new Double(ChartMax.calculate(($V{highest_ersr}.doubleValue())))]]></hc:propertyExpression>

    Note: JAR file with this function must be added to report design:

    • as link to resource
    • as import in report properties – advanced – Imports (whole class name)

If you don’t have such a function then create variable with expression which will directly calculate max for every value and will find the highest.