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 Details

  • Constructor Details

    • AbstractChartSeries

      protected AbstractChartSeries(C backLink, String instanceId)
  • Method Details

    • getThis

      protected S getThis()
    • setLabel

      public final S setLabel(String label)
      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

      public final S setDatamart(String datamart)
      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

      public final S setCurrency(String currency)
      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

      public final Filters<S> getFilters()
      Returns the builder for this series' data filters, combined with FilterOperator.AND. Equivalent to addFilters(); kept for backward compatibility with existing generated code.
      Returns:
      this series' data Filters builder. Never null.
      See Also:
    • addFilters

      public final Filters<S> addFilters()
      Returns the builder for this series' data filters, combined with FilterOperator.AND. Call Filters.addFilter(String, FilterOperator) or Filters.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 Filters builder. Never null.
      See Also:
    • addFilters

      public final Filters<S> addFilters(FilterOperator operator)
      Returns the builder for this series' data filters, combined with the given operator instead of the default FilterOperator.AND.
      Parameters:
      operator - how the field conditions added via the returned builder are combined, typically FilterOperator.AND or FilterOperator.OR
      Returns:
      this series' data Filters builder. Never null.
      See Also:
    • addProductsFilter

      public final Filters<S> 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 Filters builder. Never null.
      See Also:
    • addCustomersFilter

      public final Filters<S> 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 Filters builder. Never null.
      See Also:
    • addAggregationsFilter

      public final Filters<S> 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 to addFilters(), which filters the underlying rows before aggregation).
      Returns:
      this series' aggregations Filters builder. Never null.
      See Also:
    • addDimFilter

      public final S addDimFilter(String dimension, String value)
      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, use addFilters() instead.
      Parameters:
      dimension - the technical name of the dimension field to filter on
      value - the value the dimension must equal
      Returns:
      this series, for chaining further configuration
      See Also:
    • setFormula

      public final Formula<S> 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. Call Formula.setFormulaName(String) to select the formula, and optionally Formula.setTargetDate(java.util.Date) and Formula.addInputParameter(String, java.math.BigDecimal) / Formula.addInputParameter(String, String) to supply its inputs.
      Returns:
      a new Formula builder for this series. Never null.
    • setGeneratedQueryDto

      @Deprecated public final S setGeneratedQueryDto(String generatedQueryDto)
      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

      protected S setHideDataLabels(Boolean hideDataLabels)
      Hides this series' data labels (the value shown on or next to each point/bar/slice). Declared protected here; a concrete series type re-exposes it as public only if that chart type supports data labels.
      Parameters:
      hideDataLabels - true to hide the labels; false or null to 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 bottom amount rows by measure value, for example the top 10 customers by revenue. Declared protected here; a concrete series type re-exposes it as public only if that chart type supports Top-N/Bottom-N limiting. By default the limit applies to the series' own measure; call LimitToMeasure.setMeasure(String) on the returned builder to limit by a different measure instead.
      Parameters:
      limitPosition - LimitPosition.TOP or LimitPosition.BOTTOM
      amount - the number of rows to keep
      limitType - the kind of limit to apply; currently only LimitType.ROW exists
      Returns:
      a new LimitToMeasure builder for this series. Never null.
    • setType

      protected S setType(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. Declared protected here; a concrete series type re-exposes it as public only 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

      protected S withSortByAxisX(SortType sortType)
      Sorts this series by its X axis values. Declared protected here; a concrete series type re-exposes it as public only 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

      protected S withSortByAxisY(SortType sortType)
      Sorts this series by its Y axis values. Declared protected here; a concrete series type re-exposes it as public only 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

      protected S setComparisonDim(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. Declared protected here; a concrete series type re-exposes it as public only 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

      protected TrendLine<S> withTrendLine()
      Adds a trend line overlay to this series. Declared protected here; a concrete series type re-exposes it as public only if that chart type supports trend lines. Call TrendLine.setLabel(String) and the regression-type setter on the returned builder to configure it.
      Returns:
      a new TrendLine builder for this series. Never null.
    • setAggregationBy

      protected S setAggregationBy(String aggregationBy)
      Sets the dimension this series' rows are grouped by. Declared protected here; a concrete series type re-exposes it as public only 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

      protected S setBandBy(String bandBy)
      Sets the dimension this series' points are additionally banded (color-grouped) by, layered on top of setAggregationBy(String). Declared protected here; a concrete series type re-exposes it as public only 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

      protected S setShowBandByLegend(Boolean showBandByLegend)
      Shows or hides the legend entries for the bands added with setBandBy(String). Declared protected here; a concrete series type re-exposes it as public only if that chart type supports banding.
      Parameters:
      showBandByLegend - true to show the band legend; false or null to hide it
      Returns:
      this series, for chaining further configuration
      See Also:
    • setHideOther

      protected S setHideOther(Boolean hideOther)
      Hides the "Other" bucket that some chart types add to collect data points not otherwise shown, for example the remainder after a Top-N limit. Declared protected here; a concrete series type re-exposes it as public only if that chart type supports an "Other" bucket.
      Parameters:
      hideOther - true to hide the "Other" bucket; false or null to show it
      Returns:
      this series, for chaining further configuration
    • protectedSetAxisX

      protected S protectedSetAxisX(String axisX)
      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 named setAxisX) when its X axis is a plain field rather than an aggregated measure, for example BarLineChart.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

      protected AggrFieldAxis<S> protectedSetAggrFieldAxisX(String axisX)
      Sets this series' X axis to an aggregated numeric measure. A concrete series type calls this (and re-exposes it as public, typically also named setAxisX) when its X axis is itself an aggregated measure rather than a plain field, for example ScatterChart.ScatterSeries.
      Parameters:
      axisX - the technical name of the field to aggregate and plot on the X axis
      Returns:
      a new AggrFieldAxis builder for the X axis. Never null.
      See Also:
    • protectedSetNonAggrFieldAxisX

      protected NonAggrFieldAxis<S> protectedSetNonAggrFieldAxisX(String axisX)
      Sets this series' X axis to a non-aggregated field that still needs further per-axis configuration (unlike protectedSetAxisX(String), which returns this series directly). Available for a concrete series type to call and re-expose as public, typically also named setAxisX, mirroring protectedSetNonAggrFieldAxisY(String) on the X side.
      Parameters:
      axisX - the technical name of the field to plot on the X axis
      Returns:
      a new NonAggrFieldAxis builder for the X axis. Never null.
      See Also:
    • protectedSetAxisY

      protected S protectedSetAxisY(String axisY)
      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 named setAxisY) when its Y axis is a plain field rather than an aggregated measure, for example HeatmapChart.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

      protected AggrFieldAxis<S> protectedSetAggrFieldAxisY(String axisY)
      Sets this series' Y axis to an aggregated numeric measure. A concrete series type calls this (and re-exposes it as public, typically also named setAxisY) when its Y axis is an aggregated measure, for example ScatterChart.ScatterSeries.
      Parameters:
      axisY - the technical name of the field to aggregate and plot on the Y axis
      Returns:
      a new AggrFieldAxis builder for the Y axis. Never null.
      See Also:
    • protectedSetNonAggrFieldAxisY

      protected NonAggrFieldAxis<S> protectedSetNonAggrFieldAxisY(String axisY)
      Sets this series' Y axis to a non-aggregated field that still needs further per-axis configuration (unlike protectedSetAxisY(String), which returns this series directly). A concrete series type calls this (and re-exposes it as public, typically also named setAxisY) when its Y axis needs this extra configuration, for example BoxplotChart.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 NonAggrFieldAxis builder for the Y axis. Never null.
      See Also:
    • setShowBoxplot

      protected S setShowBoxplot(Boolean showBoxplot)
      Shows or hides an embedded box plot overlay on this series, distinct from the standalone BoxplotChart. Declared protected here; a concrete series type re-exposes it as public only if that chart type supports an embedded boxplot overlay, for example TimeSeriesChart.TimeSeriesSeries or BarLineChart.BarLineSeries.
      Parameters:
      showBoxplot - true to show the embedded boxplot overlay; false or null to hide it
      Returns:
      this series, for chaining further configuration
      See Also:
    • setBoxplotAxis

      protected NonAggrFieldAxis<S> setBoxplotAxis()
      Returns the builder for the field supplying the embedded box plot overlay's statistical distribution (minimum, quartiles, maximum), analogous to BoxplotChart.BoxplotSeries.setAxisY(String) on the standalone BoxplotChart. Declared protected here; a concrete series type re-exposes it as public only if that chart type supports an embedded boxplot overlay.
      Returns:
      a new NonAggrFieldAxis builder for the boxplot field. Never null.
      See Also:
    • setWhisker

      protected S setWhisker(WhiskerType whiskerType)
      Sets the whisker calculation method for this series' embedded box plot overlay. Declared protected here; a concrete series type re-exposes it as public only if that chart type supports an embedded boxplot overlay.
      Parameters:
      whiskerType - the whisker calculation method to use, for example WhiskerType.MIN_MAX or one of the percentile- or IQR-outlier-based methods
      Returns:
      this series, for chaining further configuration
      See Also:
    • invokeAddAdditionalMeasure

      protected String invokeAddAdditionalMeasure()