Package net.pricefx.common.api.chart
These constants say which chart to draw, and how each series renders and aggregates its measure. They also say how the data is filtered, sorted and limited, and how the chart-specific features behave. Those features are heatmap coloring, box plot whiskers, waterfall columns and auxiliary lines.
You pass the constants to the fluent chart builders in
net.pricefx.common.apibuilder.chart, which a logic obtains with
PublicGroovyAPI.newChartBuilder(). The example
below builds a bar chart of revenue by country, highest revenue first.
api.newChartBuilder().newBarLine()
.addSeries()
.setLabel("Revenue by Country")
.setDatamart("datamart_transaction")
.setType(SeriesType.BAR)
.setAxisX("Country")
.setAxisY("InvoicePrice")
.withAggregation(AggregationFormula.SUM)
.back()
.addFilters(FilterOperator.AND)
.addFilter("Year", FilterOperator.EQUAL, "2026")
.back()
.withSortByAxisY(SortType.DESCENDING)
.back()
.build()
A quicker start is to build the chart in the Data Analyzer user interface. The View Expression function then shows the generated builder code, including the constants it selected.
Two enums in this package configure a multi-tier input rather than a chart. They are
TieredValueSortType and TieredValueValidationType, and
MultiTierInputBuilder takes
them.
Reference
ChartTypeselects the kind of chart.SeriesTypeselects how a series renders.AggregationFormulaselects the aggregation of a measure.FilterOperatorselects the comparison of a filter.SortTypeselects the sort direction of a series.LimitPositionselects which end of the sorted data a limit keeps.LimitTypeselects the kind of limit.ComparisonTypeselects how two or more series compare.ColorAxisTypeselects how a heatmap colors its cells.WhiskerTypeselects the whisker range of a box plot series.WaterfallColumnTypeselects what a waterfall column does.AuxLineTypeselects the shape of an auxiliary line.AuxLineColorselects the color of an auxiliary line.TieredValueSortTypeselects the sort direction of a multi-tier input.TieredValueValidationTypeselects whether a multi-tier input validates.
- See Also:
-
Enum ClassesClassDescriptionThe aggregation formula applied to a chart series' measure or additional measure, set with
AbstractChartMeasures.withAggregation(AggregationFormula)or an equivalentwithAggregationmethod on a concrete series or axis type.A named color for an auxiliary reference line or trend line overlay, set withAuxLine.setColor(AuxLineColor)orTrendLine.setColor(AuxLineColor).Identifies which shape anAuxLineoverlay renders as.Identifies which kind of chart aChartBuilderResultrepresents.Selects how aHeatmapChart's color axis maps values to color, set withHeatmapChart.HeatmapOptions.setColorAxisType(ColorAxisType).Chooses how a chart renders a period comparison enabled withChartOptions.ZAxis.setComparison(Boolean), set withBarLineChart.BarLineOptions.setComparisonType(ComparisonType)orDetailedTimeSeriesChart.DetailedTimeSeriesOptions.setComparisonType(ComparisonType).A comparison, string-matching, null-check, set-membership, or logical-combination operator for a chart series filter condition, used withFilters.addFilter(String, net.pricefx.common.api.chart.FilterOperator),Filters.addFilter(String, net.pricefx.common.api.chart.FilterOperator, Object), or, for the logical-combination constants (FilterOperator.AND,FilterOperator.OR,FilterOperator.NOT),Filters.addFilters(net.pricefx.common.api.chart.FilterOperator).Chooses which end of a series' ranked rows a Top-N/Bottom-N limit keeps, set with a concrete series type'ssetLimitTo(LimitPosition, java.math.BigDecimal, LimitType)method, for examplePieChart.PieSeries.setLimitTo(LimitPosition, java.math.BigDecimal, LimitType).Chooses what kind of Top-N/Bottom-N limit a series applies, set with a concrete series type'ssetLimitTo(net.pricefx.common.api.chart.LimitPosition, java.math.BigDecimal, LimitType)method.Chooses how a series or additional measure itself is rendered, independently of the chart's overall type, set with a concrete series or measure type'ssetType(SeriesType)method (or an equivalent method on a concrete series type), for exampleDetailedTimeSeriesChart.DetailedTimeSeriesSeries.setType(SeriesType)orChartSeries.EmbeddedBoxplot.setType(SeriesType), for example rendering one series of a Bar & Line Chart as a line while its other series render as bars.Chooses the sort direction for a series or dimension, set with a concrete series type'swithSortByAxisX(SortType)orwithSortByAxisY(SortType)method (or an equivalent method on a concrete series type), for exampleBoxplotChart.BoxplotSeries.withSortByAxisX(SortType)orBoxplotChart.BoxplotSeries.withSortByAxisY(SortType), or withPieChart.PieSeries.withSortByCategories(SortType).Chooses whether a Multi Tier Entry input's tiers are sorted by their target value ascending or descending, set withMultiTierInputBuilder.setSortType(TieredValueSortType).Chooses whether a Multi Tier Entry input validates its entered tiers, set withMultiTierInputBuilder.setValidationType(TieredValueValidationType).Chooses what kind of column aWaterfallChart.WaterfallSeriesorWaterfallComparisonChart.WaterfallComparisonSeriesadds to its bridge, set withWaterfallChart.WaterfallSeries.addWaterfallColumn(WaterfallColumnType, String, String)or the analogous method on a Waterfall Comparison Chart's series.Chooses the statistical method used to compute a box plot's whisker (minimum/maximum) bounds.