Class RangeIndicatorChartReport

All Implemented Interfaces:
Selectable<Report>, Comparable<Report>
Direct Known Subclasses:
BoxAndWhiskerChartReport, TargetLimitReport

public class RangeIndicatorChartReport extends Report
This class produces charts that show values and a secondary indicator, such as a benchmark value. The benchmark values are static and are passed in to the constructor.

If reporting on account values and using the min and max target levels as the secondary indicators, consider using the TargetLimitReport for convenience.

 String[] columns = new String[] {"feature.Yield.managed.Conif", 
 String[] cls = new String[] {"Conif", "Decid"};

 double[][][][] rangeData = new double[2][2][][];
 rangeData[0][0] = new double[][] {{0,200}, {6000000,6000000}};
 rangeData[0][1] = new double[][] {{0,200}, {14000000,14000000}};
 rangeData[1][0] = new double[][] {{0,200}, {300000,300000}};
 rangeData[1][1] = new double[][] {{0,200}, {700000,700000}};
 reportWriter.addReport(new RangeIndicatorChartReport("range",
   "Growing stock range",
   "Species type",
   "Simulation range",

Range indicator chart

The range data array contains one entry for each data column. Within each column there are entries for the minimum (second array position index 0) and maximum (second array position index 1) bars to display. Min or max bars can be omitted by setting the entry to null. Each threshold bar is represented with a pairs of lists containing the x and y values that define the shape of the upper or lower threshold. There must be an equal number of values in the x and y lists.

Note that this class is new and is subject to change.

See Also:
TargetLimitReport, BoxAndWhiskerChartReport
  • Field Details

    • TYPES

      public static final String[] TYPES
  • Constructor Details

    • RangeIndicatorChartReport

      public RangeIndicatorChartReport(String filename, String title, AttributeStore as, String units, String xCaption, String legendCaption, String valueExpression, String categoryColumn, String[] categories, String[] categoryNames, double[][][][] threshData, int numPeriods, boolean annualize, String html)
      Show a min/max range diagram along with each category.

      The range data is provided in an array, one for each category. Within each category is an array of teo element containing the upper and lower threshold data. Either element can be void indicating that the threshold should not be drawn. For each threshold is an array of two elements, the first containing the series of x-values that defines the threshold, and the second contains the y-values. The x and y arrays must be of the same length.

      filename - The name to save the file
      title - The report title
      units - Units to be displayed on the y axis
      xCaption - the caption on the x axis
      legendCaption - The legend caption for the simulation data
      valueExpression - An expression that defines the numeric values in the chart.
      categoryColumn - An expression that contains the categories.
      categories - The categories from input dataset
      categoryNames - The names to be placed on the xaxis for each category
      threshData - The limit data, organized by category.
      annualize - A flag to indicate if the values should be annualized. If true then values from period 0 (prior to the start of the simulation) are not shown. All other values are divided by the width of the period.
      html - Additional HTML text to be displayed in the report.
  • Method Details

    • setExpression

      public void setExpression(String expression)
    • getExpression

      public String getExpression()
    • getUnits

      public String getUnits()
    • setUnits

      public void setUnits(String units)
    • getXCaption

      public String getXCaption()
    • setXCaption

      public void setXCaption(String caption)
    • getLegendCaption

      public String getLegendCaption()
    • setLegendCaption

      public void setLegendCaption(String caption)
    • getCategoryColumn

      public String getCategoryColumn()
    • setCategoryColumn

      public void setCategoryColumn(String column)
    • getCategories

      public String[] getCategories()
    • setCategories

      public void setCategories(String[] categories)
    • getCategoryNames

      public String[] getCategoryNames()
    • setCategoryNames

      public void setCategoryNames(String[] categoryNames)
    • getNumPeriods

      public int getNumPeriods()
    • setNumPeriods

      public void setNumPeriods(int numPeriods)
    • isAnnualize

      public boolean isAnnualize()
    • setAnnualize

      public void setAnnualize(boolean state)
    • getHTMLText

      public String getHTMLText()
    • setHTMLText

      public void setHTMLText(String text)
    • getThreshData

      public double[][][][] getThreshData()
    • doReport

      public ca.spatial.reportwriter.Report.DataCache doReport(String filename, PrintStream out, Map<String,​Object> param, ca.spatial.reportwriter.Report.DataCache cache)
      Description copied from class: Report
      The method used by the report writer to format the requested report. This method is implemented in every custom report. Application programs generally do not need to call this method, but instead use the report writer methods to obtain reports.
      Specified by:
      doReport in class Report
      filename - The full name of the report to be printed, including the extension of the sub-report (if any).
      out - The output stream to print output on to.
      param - A HashMap containing parameters that modify the report (for example the scenario name).
    • getTypes

      public String[] getTypes()
      Description copied from class: Report
      An accessor function to retrieve the list of report types supported by this report. See the documentation for the TYPES variable for the list of sub-types.
      Specified by:
      getTypes in class Report