Class AbstractChartSeries<C extends AbstractChartBuilder<C>,S extends AbstractChartSeries<C,S>>
Object
ObjectIdentity
BacklinkBuilder<C>
AbstractChartSeries<C,S>
- Direct Known Subclasses:
BoxplotChart.BoxplotSeries,ChartSeries.Basic
public class AbstractChartSeries<C extends AbstractChartBuilder<C>,S extends AbstractChartSeries<C,S>>
extends BacklinkBuilder<C>
Common base class for the series builders returned by every chart type's
addSeries() or
getSeries() method, for example ScatterChart.ScatterSeries or
BarLineChart.BarLineSeries. You never instantiate this class or a concrete subclass of it directly;
you get one from the concrete chart builder returned by a ChartBuilder factory method.
A series identifies the Datamart it queries and the measure(s) it plots. Most of this class's methods are
declared protected here and selectively re-exposed as public by each concrete series type,
because not every chart type supports every option the same way, for example a Pie series has no X/Y axis at
all, and only some series types support an embedded boxplot overlay. Consult a concrete series type's own
public methods, such as ScatterChart.ScatterSeries, to see which of these are actually available on
it.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class BacklinkBuilder
METHOD_BACKFields inherited from class ObjectIdentity
classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the builder for this series' aggregations filter, restricting which aggregated result rows are included after the Datamart query's grouping and aggregation have been applied (as opposed toaddFilters(), which filters the underlying rows before aggregation).Returns the builder for this series' Customer filter, restricting the series to a set of Customers chosen from Customer master data rather than a raw Datamart field condition.final SaddDimFilter(String dimension, String value) Adds an equality filter on a single dimension field.Returns the builder for this series' data filters, combined withFilterOperator.AND.addFilters(FilterOperator operator) Returns the builder for this series' data filters, combined with the given operator instead of the defaultFilterOperator.AND.Returns the builder for this series' Product filter, restricting the series to a set of Products chosen from Product master data rather than a raw Datamart field condition.Returns the builder for this series' data filters, combined withFilterOperator.AND.protected SgetThis()protected Stringprotected AggrFieldAxis<S> protectedSetAggrFieldAxisX(String axisX) Sets this series' X axis to an aggregated numeric measure.protected AggrFieldAxis<S> protectedSetAggrFieldAxisY(String axisY) Sets this series' Y axis to an aggregated numeric measure.protected SprotectedSetAxisX(String axisX) Sets this series' X axis to a plain, non-aggregated field, for example a category dimension.protected SprotectedSetAxisY(String axisY) Sets this series' Y axis to a plain, non-aggregated field, for example a category dimension.protected NonAggrFieldAxis<S> Sets this series' X axis to a non-aggregated field that still needs further per-axis configuration (unlikeprotectedSetAxisX(String), which returns this series directly).protected NonAggrFieldAxis<S> Sets this series' Y axis to a non-aggregated field that still needs further per-axis configuration (unlikeprotectedSetAxisY(String), which returns this series directly).protected SsetAggregationBy(String aggregationBy) Sets the dimension this series' rows are grouped by.protected SSets the dimension this series' points are additionally banded (color-grouped) by, layered on top ofsetAggregationBy(String).protected NonAggrFieldAxis<S> Returns the builder for the field supplying the embedded box plot overlay's statistical distribution (minimum, quartiles, maximum), analogous toBoxplotChart.BoxplotSeries.setAxisY(String)on the standaloneBoxplotChart.protected SsetComparisonDim(String comparisonDimension) Sets the dimension this series is compared against a prior period on, for example comparing this period's revenue to the same dimension value last period.final SsetCurrency(String currency) Sets the currency this series' monetary values are displayed in.final SsetDatamart(String datamart) Sets the Datamart this series queries.Returns the builder for running an Analytics logic (Pricing Formula) against this series' query, for use by chart types that support auxiliary lines.final SsetGeneratedQueryDto(String generatedQueryDto) Deprecated.Internal interoperability mechanism for older (Ember-based) Data Analyzer UI generated code only.protected SsetHideDataLabels(Boolean hideDataLabels) Hides this series' data labels (the value shown on or next to each point/bar/slice).protected SsetHideOther(Boolean hideOther) Hides the "Other" bucket that some chart types add to collect data points not otherwise shown, for example the remainder after aTop-N limit.final SSets this series' display label, shown in the chart's legend and tooltips.protected LimitToMeasure<S> setLimitTo(LimitPosition limitPosition, BigDecimal amount, LimitType limitType) Limits this series to its top or bottomamountrows by measure value, for example the top 10 customers by revenue.protected SsetShowBandByLegend(Boolean showBandByLegend) Shows or hides the legend entries for the bands added withsetBandBy(String).protected SsetShowBoxplot(Boolean showBoxplot) Shows or hides an embedded box plot overlay on this series, distinct from the standaloneBoxplotChart.protected SsetType(SeriesType seriesType) Sets how this series itself is rendered, independently of the chart's overall type, for example rendering one series of a Bar & Line Chart as a line while its other series render as bars.protected SsetWhisker(WhiskerType whiskerType) Sets the whisker calculation method for this series' embedded box plot overlay.protected SwithSortByAxisX(SortType sortType) Sorts this series by its X axis values.protected SwithSortByAxisY(SortType sortType) Sorts this series by its Y axis values.Adds a trend line overlay to this series.Methods inherited from class BacklinkBuilder
back, getParentMethods inherited from class ObjectIdentity
addInvocation, addInvocation, addInvocationInternal, getClassId
-
Field Details
-
filters
-
productsFilter
-
customersFilter
-
aggregationsFilter
-
-
Constructor Details
-
AbstractChartSeries
-
-
Method Details
-
getThis
-
setLabel
Sets this series' display label, shown in the chart's legend and tooltips.- Parameters:
label- the label to display for this series- Returns:
- this series, for chaining further configuration
-
setDatamart
Sets the Datamart this series queries. Every series needs a Datamart before its axis and measure fields can be resolved.- Parameters:
datamart- the technical name of the Datamart to query- Returns:
- this series, for chaining further configuration
-
setCurrency
Sets the currency this series' monetary values are displayed in.- Parameters:
currency- an ISO 4217 currency code, for example"USD"or"EUR"- Returns:
- this series, for chaining further configuration
-
getFilters
Returns the builder for this series' data filters, combined withFilterOperator.AND. Equivalent toaddFilters(); kept for backward compatibility with existing generated code.- Returns:
- this series' data
Filtersbuilder. Nevernull. - See Also:
-
addFilters
Returns the builder for this series' data filters, combined withFilterOperator.AND. CallFilters.addFilter(String, FilterOperator)orFilters.addFilter(String, FilterOperator, Object)on the returned builder for each field condition to apply.Example:
def series = api.newChartBuilder().newScatter().addSeries() series.addFilters() .addFilter("Country", FilterOperator.EQUAL, "Germany") .back()- Returns:
- this series' data
Filtersbuilder. Nevernull. - See Also:
-
addFilters
Returns the builder for this series' data filters, combined with the given operator instead of the defaultFilterOperator.AND.- Parameters:
operator- how the field conditions added via the returned builder are combined, typicallyFilterOperator.ANDorFilterOperator.OR- Returns:
- this series' data
Filtersbuilder. Nevernull. - See Also:
-
addProductsFilter
Returns the builder for this series' Product filter, restricting the series to a set of Products chosen from Product master data rather than a raw Datamart field condition. Internally, whatever criteria is built resolves to a filter on the unique Product ID.- Returns:
- this series' Product
Filtersbuilder. Nevernull. - See Also:
-
addCustomersFilter
Returns the builder for this series' Customer filter, restricting the series to a set of Customers chosen from Customer master data rather than a raw Datamart field condition. Internally, whatever criteria is built resolves to a filter on the unique Customer ID.- Returns:
- this series' Customer
Filtersbuilder. Nevernull. - See Also:
-
addAggregationsFilter
Returns the builder for this series' aggregations filter, restricting which aggregated result rows are included after the Datamart query's grouping and aggregation have been applied (as opposed toaddFilters(), which filters the underlying rows before aggregation).- Returns:
- this series' aggregations
Filtersbuilder. Nevernull. - See Also:
-
addDimFilter
Adds an equality filter on a single dimension field. This is a shorthand for the common case of filtering a series to one specific dimension value; for other operators or multiple conditions, useaddFilters()instead.- Parameters:
dimension- the technical name of the dimension field to filter onvalue- the value the dimension must equal- Returns:
- this series, for chaining further configuration
- See Also:
-
setFormula
Returns the builder for running an Analytics logic (Pricing Formula) against this series' query, for use by chart types that support auxiliary lines. Only the logic's Summary output is used, never its row-level output; a typical use is supplying an auxiliary line's X/Y intercept or steepness, for example a trend line's regression coefficients. This does not compute or replace this series' own plotted Datamart value. CallFormula.setFormulaName(String)to select the formula, and optionallyFormula.setTargetDate(java.util.Date)andFormula.addInputParameter(String, java.math.BigDecimal)/Formula.addInputParameter(String, String)to supply its inputs.- Returns:
- a new
Formulabuilder for this series. Nevernull.
-
setGeneratedQueryDto
Deprecated.Internal interoperability mechanism for older (Ember-based) Data Analyzer UI generated code only. Not meant to be hand-authored, and may be removed without replacement in a future release.Sets a pre-generated query DTO for this series. This is an internal interoperability mechanism used by the Data Analyzer UI when generating ChartBuilder Groovy code for older (Ember-based) partitions; it is not meant to be hand-authored, and it may be dropped from generated code entirely in a future release.- Parameters:
generatedQueryDto- an opaque, pre-serialized query representation- Returns:
- this series, for chaining further configuration
-
setHideDataLabels
Hides this series' data labels (the value shown on or next to each point/bar/slice). Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports data labels.- Parameters:
hideDataLabels-trueto hide the labels;falseornullto show them- Returns:
- this series, for chaining further configuration
-
setLimitTo
protected LimitToMeasure<S> setLimitTo(LimitPosition limitPosition, BigDecimal amount, LimitType limitType) Limits this series to its top or bottomamountrows by measure value, for example the top 10 customers by revenue. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports Top-N/Bottom-N limiting. By default the limit applies to the series' own measure; callLimitToMeasure.setMeasure(String)on the returned builder to limit by a different measure instead.- Parameters:
limitPosition-LimitPosition.TOPorLimitPosition.BOTTOMamount- the number of rows to keeplimitType- the kind of limit to apply; currently onlyLimitType.ROWexists- Returns:
- a new
LimitToMeasurebuilder for this series. Nevernull.
-
setType
Sets how this series itself is rendered, independently of the chart's overall type, for example rendering one series of a Bar & Line Chart as a line while its other series render as bars. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports mixing rendering types across series.- Parameters:
seriesType- the rendering type to use for this series- Returns:
- this series, for chaining further configuration
-
withSortByAxisX
Sorts this series by its X axis values. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports sorting by the X axis.- Parameters:
sortType- the sort direction to apply- Returns:
- this series, for chaining further configuration
- See Also:
-
withSortByAxisY
Sorts this series by its Y axis values. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports sorting by the Y axis.- Parameters:
sortType- the sort direction to apply- Returns:
- this series, for chaining further configuration
- See Also:
-
setComparisonDim
Sets the dimension this series is compared against a prior period on, for example comparing this period's revenue to the same dimension value last period. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports period-over-period comparison.- Parameters:
comparisonDimension- the technical name of the dimension field to compare by- Returns:
- this series, for chaining further configuration
-
withTrendLine
Adds a trend line overlay to this series. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports trend lines. CallTrendLine.setLabel(String)and the regression-type setter on the returned builder to configure it.- Returns:
- a new
TrendLinebuilder for this series. Nevernull.
-
setAggregationBy
Sets the dimension this series' rows are grouped by. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports this grouping.- Parameters:
aggregationBy- the technical name of the dimension field to group by- Returns:
- this series, for chaining further configuration
- See Also:
-
setBandBy
Sets the dimension this series' points are additionally banded (color-grouped) by, layered on top ofsetAggregationBy(String). Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports banding.- Parameters:
bandBy- the technical name of the dimension field to band by- Returns:
- this series, for chaining further configuration
- See Also:
-
setShowBandByLegend
Shows or hides the legend entries for the bands added withsetBandBy(String). Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports banding.- Parameters:
showBandByLegend-trueto show the band legend;falseornullto hide it- Returns:
- this series, for chaining further configuration
- See Also:
-
setHideOther
Hides the "Other" bucket that some chart types add to collect data points not otherwise shown, for example the remainder after aTop-N limit. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports an "Other" bucket.- Parameters:
hideOther-trueto hide the "Other" bucket;falseornullto show it- Returns:
- this series, for chaining further configuration
-
protectedSetAxisX
Sets this series' X axis to a plain, non-aggregated field, for example a category dimension. A concrete series type calls this (and re-exposes it as public, typically also namedsetAxisX) when its X axis is a plain field rather than an aggregated measure, for exampleBarLineChart.BarLineSeries.- Parameters:
axisX- the technical name of the field to plot on the X axis- Returns:
- this series, for chaining further configuration
- See Also:
-
protectedSetAggrFieldAxisX
Sets this series' X axis to an aggregated numeric measure. A concrete series type calls this (and re-exposes it as public, typically also namedsetAxisX) when its X axis is itself an aggregated measure rather than a plain field, for exampleScatterChart.ScatterSeries.- Parameters:
axisX- the technical name of the field to aggregate and plot on the X axis- Returns:
- a new
AggrFieldAxisbuilder for the X axis. Nevernull. - See Also:
-
protectedSetNonAggrFieldAxisX
Sets this series' X axis to a non-aggregated field that still needs further per-axis configuration (unlikeprotectedSetAxisX(String), which returns this series directly). Available for a concrete series type to call and re-expose as public, typically also namedsetAxisX, mirroringprotectedSetNonAggrFieldAxisY(String)on the X side.- Parameters:
axisX- the technical name of the field to plot on the X axis- Returns:
- a new
NonAggrFieldAxisbuilder for the X axis. Nevernull. - See Also:
-
protectedSetAxisY
Sets this series' Y axis to a plain, non-aggregated field, for example a category dimension. A concrete series type calls this (and re-exposes it as public, typically also namedsetAxisY) when its Y axis is a plain field rather than an aggregated measure, for exampleHeatmapChart.HeatmapSeries.- Parameters:
axisY- the technical name of the field to plot on the Y axis- Returns:
- this series, for chaining further configuration
- See Also:
-
protectedSetAggrFieldAxisY
Sets this series' Y axis to an aggregated numeric measure. A concrete series type calls this (and re-exposes it as public, typically also namedsetAxisY) when its Y axis is an aggregated measure, for exampleScatterChart.ScatterSeries.- Parameters:
axisY- the technical name of the field to aggregate and plot on the Y axis- Returns:
- a new
AggrFieldAxisbuilder for the Y axis. Nevernull. - See Also:
-
protectedSetNonAggrFieldAxisY
Sets this series' Y axis to a non-aggregated field that still needs further per-axis configuration (unlikeprotectedSetAxisY(String), which returns this series directly). A concrete series type calls this (and re-exposes it as public, typically also namedsetAxisY) when its Y axis needs this extra configuration, for exampleBoxplotChart.BoxplotSeries, whose Y axis supplies the pre-computed statistical distribution a Box Plot Chart renders.- Parameters:
axisY- the technical name of the field to plot on the Y axis- Returns:
- a new
NonAggrFieldAxisbuilder for the Y axis. Nevernull. - See Also:
-
setShowBoxplot
Shows or hides an embedded box plot overlay on this series, distinct from the standaloneBoxplotChart. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports an embedded boxplot overlay, for exampleTimeSeriesChart.TimeSeriesSeriesorBarLineChart.BarLineSeries.- Parameters:
showBoxplot-trueto show the embedded boxplot overlay;falseornullto hide it- Returns:
- this series, for chaining further configuration
- See Also:
-
setBoxplotAxis
Returns the builder for the field supplying the embedded box plot overlay's statistical distribution (minimum, quartiles, maximum), analogous toBoxplotChart.BoxplotSeries.setAxisY(String)on the standaloneBoxplotChart. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports an embedded boxplot overlay.- Returns:
- a new
NonAggrFieldAxisbuilder for the boxplot field. Nevernull. - See Also:
-
setWhisker
Sets the whisker calculation method for this series' embedded box plot overlay. Declaredprotectedhere; a concrete series type re-exposes it aspubliconly if that chart type supports an embedded boxplot overlay.- Parameters:
whiskerType- the whisker calculation method to use, for exampleWhiskerType.MIN_MAXor one of the percentile- or IQR-outlier-based methods- Returns:
- this series, for chaining further configuration
- See Also:
-
invokeAddAdditionalMeasure
-