Package net.pricefx.common.api.chart
Enum Class AggregationFormula
- All Implemented Interfaces:
Serializable,Comparable<AggregationFormula>,Constable
The aggregation formula applied to a chart series' measure or additional measure, set with
AbstractChartMeasures.withAggregation(AggregationFormula) or an
equivalent withAggregation method on a concrete series or axis type. The withPercent,
withPerUnit, withAverage, and withTotal shortcut methods cover the most common of
these constants without passing the enum directly. Corresponds to the options in the Data Analyzer UI's
Aggregation dropdown.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAverages the measure's values across the group, the "Average" aggregation option.Shows each row's share of the total, the "Contribution" aggregation option.Counts the number of rows in the group, the "Count" aggregation option.Counts the number of distinct values in the group, the "Count Distinct" aggregation option.Runs a cumulative sum of each row'scontribution, the "Cumulative Contribution" aggregation option.Runs a cumulative sum across the series, the "Cumulative Sum" aggregation option.Computes the value from a named Pricing Formula rather than aggregating a Datamart field.Computes the value from a Datamart function rather than a fixed aggregation formula, the "Function" aggregation option.Shows each row's value relative to a base value, the "Index" aggregation option.The catch-all option used when the measure or axis is computed from something other than a fixed aggregation formula, for example a Datamart Expression set viaAggrFieldAxis.withExpression(); the "Editor…" aggregation option in the Data Analyzer UI.Shows each row's value as a percentage of the group total, the "Percent" aggregation option.Divides the measure's total by a unit quantity, the "Per Unit" aggregation option.Sums the measure's values across the group, the "Sum" aggregation option. -
Method Summary
Modifier and TypeMethodDescriptionstatic AggregationFormulaReturns the enum constant of this class with the specified name.static AggregationFormula[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUM
Sums the measure's values across the group, the "Sum" aggregation option. Equivalent to thewithTotal()shortcut. -
PERUNIT
Divides the measure's total by a unit quantity, the "Per Unit" aggregation option. -
AVERAGE
Averages the measure's values across the group, the "Average" aggregation option. -
PERCENT
Shows each row's value as a percentage of the group total, the "Percent" aggregation option. -
INDEX
Shows each row's value relative to a base value, the "Index" aggregation option. -
PERUNIT_INDEX
-
CUMSUM
Runs a cumulative sum across the series, the "Cumulative Sum" aggregation option. -
CONTRIB
Shows each row's share of the total, the "Contribution" aggregation option. -
CUMCONTRIB
Runs a cumulative sum of each row'scontribution, the "Cumulative Contribution" aggregation option. -
COUNT
Counts the number of rows in the group, the "Count" aggregation option. -
COUNTDISTINCT
Counts the number of distinct values in the group, the "Count Distinct" aggregation option. -
FORMULA
Computes the value from a named Pricing Formula rather than aggregating a Datamart field. Set viawithFormula()on the axis or measure, which only marks the aggregation asFORMULA; the formula itself must be selected separately withAbstractChartSeries.setFormula()andFormula.setFormulaName(String)on the series. -
FUNCTION
Computes the value from a Datamart function rather than a fixed aggregation formula, the "Function" aggregation option. -
MORE
The catch-all option used when the measure or axis is computed from something other than a fixed aggregation formula, for example a Datamart Expression set viaAggrFieldAxis.withExpression(); the "Editor…" aggregation option in the Data Analyzer UI.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-