Class AbstractChartMeasures<S extends AbstractChartSeries<?,S>,M extends AbstractChartMeasures<S,M>>
- Direct Known Subclasses:
BoxplotChart.BoxplotAdditionalMeasure,ChartMeasures.Basic
addAdditionalMeasure() method, for example ScatterChart.ScatterAdditionalMeasure or
BarLineChart.BarLineAdditionalMeasure. You never instantiate this class or a concrete subclass of it
directly.
An additional measure lets a series plot more than one numeric measure, each configured independently: which
field or expression it comes from (setMeasure(String), withExpression()), how it is
aggregated (withAggregation(AggregationFormula) and the withPercent()/
withPerUnit()/withAverage()/withTotal() shortcuts), and its own label
(setLabel(String)). Most of this class's methods are declared protected here and
selectively re-exposed as public by intermediate tier classes in ChartMeasures
(ChartMeasures.Basic, ChartMeasures.Type, ChartMeasures.EmbeddedBoxplot), mirroring
how AbstractChartSeries exposes its own optional methods. Not every chart type extends one of these
tiers at all: BoxplotChart.BoxplotAdditionalMeasure extends this class directly. Consult a concrete
type's own public methods to see which of these are actually available on it.
- See Also:
-
Field Summary
Fields inherited from class BacklinkBuilder
METHOD_BACKFields inherited from class ObjectIdentity
classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MgetThis()final MsetId(int measureId) Assigns an explicit numeric ID to this additional measure, overriding the automatically generated one.Sets this additional measure's own display label, shown in the chart's legend and tooltips, independent of the series' ownlabel.final MsetMeasure(String measure) Sets the Datamart field this additional measure aggregates.protected MsetOnZAxis(Boolean onZAxis) Plots this additional measure on the chart's secondary Z axis instead of alongside the series' primary measure.protected MsetType(SeriesType seriesType) Sets how this additional measure itself is rendered, independently of its series' overall type, for example rendering an additional measure as a line overlaid on a bar series.protected MwithAggregation(String aggregationFunction) Sets the aggregation formula for this additional measure by its raw string name, for cases not covered by thewithAggregation(AggregationFormula)overload or thewithPercent()/withPerUnit()/withAverage()/withTotal()shortcuts.protected MwithAggregation(AggregationFormula aggregationFunction) Sets the aggregation formula for this additional measure.protected MShorthand forwithAggregation(AggregationFormula.AVERAGE).protected Expression<M> Returns the builder for computing this additional measure's embedded box plot overlay from a Datamart Expression instead of a plain field set withwithBoxplotField().protected MMarks this additional measure as the field supplying an embedded box plot overlay, analogous toAbstractChartSeries.setBoxplotAxis()at the series level.final Expression<M> Returns the builder for computing this additional measure from a Datamart Expression instead of a plain field set withsetMeasure(String).protected MMarks this additional measure as computed from a named Pricing Formula: the value previously set viasetMeasure(String)is then treated as a Formula name rather than a plain Datamart field name.protected MShorthand forwithAggregation(AggregationFormula.PERCENT).protected MShorthand forwithAggregation(AggregationFormula.PERUNIT).protected MShorthand for summing this additional measure's values (the Data Analyzer's "Sum" aggregation option).Methods inherited from class BacklinkBuilder
back, getParentMethods inherited from class ObjectIdentity
addInvocation, addInvocation, addInvocationInternal, getClassId
-
Constructor Details
-
AbstractChartMeasures
-
-
Method Details
-
getThis
-
setMeasure
Sets the Datamart field this additional measure aggregates.- Parameters:
measure- the technical name of the field to aggregate- Returns:
- this additional measure, for chaining further configuration
- See Also:
-
setId
Assigns an explicit numeric ID to this additional measure, overriding the automatically generated one.- Parameters:
measureId- the ID to assign to this additional measure- Returns:
- this additional measure, for chaining further configuration
-
withExpression
Returns the builder for computing this additional measure from a Datamart Expression instead of a plain field set withsetMeasure(String). CallExpression.setExpression(String)on the returned builder to supply the expression, and optionallyExpression.setDefaultValue(java.math.BigDecimal)andExpression.setDescription(String).- Returns:
- a new
Expressionbuilder for this additional measure. Nevernull. - See Also:
-
withAggregation
Sets the aggregation formula for this additional measure by its raw string name, for cases not covered by thewithAggregation(AggregationFormula)overload or thewithPercent()/withPerUnit()/withAverage()/withTotal()shortcuts. Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Basic(or a subclass of it).- Parameters:
aggregationFunction- the name of anAggregationFormulaconstant, or another aggregation identifier the Data Analyzer recognizes- Returns:
- this additional measure, for chaining further configuration
- See Also:
-
withAggregation
Sets the aggregation formula for this additional measure. Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Basic(or a subclass of it). ThewithPercent(),withPerUnit(),withAverage(), andwithTotal()methods are shortcuts for the most common formulas that avoid passing the enum constant directly.- Parameters:
aggregationFunction- the aggregation formula to apply- Returns:
- this additional measure, for chaining further configuration
- See Also:
-
withFormula
Marks this additional measure as computed from a named Pricing Formula: the value previously set viasetMeasure(String)is then treated as a Formula name rather than a plain Datamart field name. Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Basic(or a subclass of it).- Returns:
- this additional measure, for chaining further configuration
- See Also:
-
withPercent
Shorthand forwithAggregation(AggregationFormula.PERCENT). Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Basic(or a subclass of it).- Returns:
- this additional measure, for chaining further configuration
-
withPerUnit
Shorthand forwithAggregation(AggregationFormula.PERUNIT). Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Basic(or a subclass of it).- Returns:
- this additional measure, for chaining further configuration
-
withAverage
Shorthand forwithAggregation(AggregationFormula.AVERAGE). Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Basic(or a subclass of it).- Returns:
- this additional measure, for chaining further configuration
-
withTotal
Shorthand for summing this additional measure's values (the Data Analyzer's "Sum" aggregation option). Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Basic(or a subclass of it).- Returns:
- this additional measure, for chaining further configuration
-
setType
Sets how this additional measure itself is rendered, independently of its series' overall type, for example rendering an additional measure as a line overlaid on a bar series. Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Type(or a subclass of it).- Parameters:
seriesType- the rendering type to use for this additional measure- Returns:
- this additional measure, for chaining further configuration
-
setOnZAxis
Plots this additional measure on the chart's secondary Z axis instead of alongside the series' primary measure. Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.Type(or a subclass of it), or overrides it directly asBoxplotChart.BoxplotAdditionalMeasuredoes.- Parameters:
onZAxis-trueto plot this measure on the Z axis;falseornullto plot it alongside the primary measure- Returns:
- this additional measure, for chaining further configuration
-
setLabel
Sets this additional measure's own display label, shown in the chart's legend and tooltips, independent of the series' ownlabel.- Parameters:
measureLabel- the label to display for this additional measure- Returns:
- this additional measure, for chaining further configuration
-
withBoxplotField
Marks this additional measure as the field supplying an embedded box plot overlay, analogous toAbstractChartSeries.setBoxplotAxis()at the series level. Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.EmbeddedBoxplot.- Returns:
- this additional measure, for chaining further configuration
- See Also:
-
withBoxplotExpression
Returns the builder for computing this additional measure's embedded box plot overlay from a Datamart Expression instead of a plain field set withwithBoxplotField(). Declaredprotectedhere; a concrete additional-measure type re-exposes it aspublicviaChartMeasures.EmbeddedBoxplot.- Returns:
- a new
Expressionbuilder for the boxplot overlay. Nevernull. - See Also:
-