Class RangeIndicatorChartReport
- All Implemented Interfaces:
Selectable<Report>
,Comparable<Report>
- Direct Known Subclasses:
BoxAndWhiskerChartReport
,TargetLimitReport
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", "feature.Yield.managed.Decid"}; 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", control.getTargetTable(), "m3", "Species type", "Simulation range", "CURRENT", "TARGET", columns, cls, rangeData, periods, false, ""));

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
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.spatial.reportwriter.Report
Report.GetNodesAt
-
Field Summary
FieldsFields inherited from class ca.spatial.reportwriter.Report
AREA, LINE, PIE, SIDE_BY_SIDE_BARS, STACKED_BARS
-
Constructor Summary
ConstructorsConstructorDescriptionRangeIndicatorChartReport(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. -
Method Summary
Modifier and TypeMethodDescriptionca.spatial.reportwriter.Report.DataCache
doReport(String filename, PrintStream out, Map<String,Object> param, ca.spatial.reportwriter.Report.DataCache cache)
The method used by the report writer to format the requested report.String[]
String[]
int
double[][][][]
String[]
getTypes()
An accessor function to retrieve the list of report types supported by this report.getUnits()
boolean
void
setAnnualize(boolean state)
void
setCategories(String[] categories)
void
setCategoryColumn(String column)
void
setCategoryNames(String[] categoryNames)
void
setExpression(String expression)
void
setHTMLText(String text)
void
setLegendCaption(String caption)
void
setNumPeriods(int numPeriods)
void
void
setXCaption(String caption)
Methods inherited from class ca.spatial.reportwriter.Report
addDefaultParam, chartImg, compareTo, csvLink, doesAnyTypes, doesCSV, doesGIF, doesHTML, doesPNG, doesType, encodeFileURL, encodeURL, endMainContent, escapeRegexChars, footer, formatColumnHeadings, formatColumnHeadings, getAdditionalFiles, getAttributeStore, getBasepart, getBasepart, getDefaultFilename, getDisplayFormat, getExtension, getExtension, getFilename, getFolderpart, getFolderpart, getLength, getNamepart, getNamepart, getPathToRoot, getReportFor, getTitle, header, htmlText, indexLink, interpolateParams, isDhandler, isIndexed, isSelected, parentIndex, patternToRegex, setAttributeStore, setDefaultParams, setDisplayFormat, setIndexed, setSelected, setTitle, toString, uniqueLabels
-
Field Details
-
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.
- Parameters:
filename
- The name to save the filetitle
- The report titleunits
- Units to be displayed on the y axisxCaption
- the caption on the x axislegendCaption
- The legend caption for the simulation datavalueExpression
- An expression that defines the numeric values in the chart.categoryColumn
- An expression that contains the categories.categories
- The categories from input datasetcategoryNames
- The names to be placed on the xaxis for each categorythreshData
- 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
-
getExpression
-
getUnits
-
setUnits
-
getXCaption
-
setXCaption
-
getLegendCaption
-
setLegendCaption
-
getCategoryColumn
-
setCategoryColumn
-
getCategories
-
setCategories
-
getCategoryNames
-
setCategoryNames
-
getNumPeriods
public int getNumPeriods() -
setNumPeriods
public void setNumPeriods(int numPeriods) -
isAnnualize
public boolean isAnnualize() -
setAnnualize
public void setAnnualize(boolean state) -
getHTMLText
-
setHTMLText
-
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. -
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.
-