Class ChartBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionChartBuilder(IdGenerator idGenerator, InvocationBuilder<MethodInvocation> invocationBuilder) -
Method Summary
Modifier and TypeMethodDescriptionCreates a newBarLineChartbuilder, the starting point for defining a Bar & Line Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newBoxplotChartbuilder, the starting point for defining a Box Plot Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newBubbleChartbuilder, the starting point for defining a Bubble Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newDataTableChartbuilder, the starting point for defining a Data Table, one of the chart types available in the Data Analyzer within Analytics.Creates a newDetailedTimeSeriesChartbuilder, the starting point for defining a Detailed Time Series Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newHeatmapChartbuilder, the starting point for defining a Heatmap, one of the chart types available in the Data Analyzer within Analytics.Creates a newHistogramChartbuilder, the starting point for defining a Histogram, one of the chart types available in the Data Analyzer within Analytics.newPie()Creates a newPieChartbuilder, the starting point for defining a Pie Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newScatterChartbuilder, the starting point for defining a Scatter Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newTimeSeriesChartbuilder, the starting point for defining a Time Series Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newTimeSeriesScatterChartbuilder, the starting point for defining a Time Series Scatter Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newWaterfallChartbuilder, the starting point for defining a Waterfall Chart, one of the chart types available in the Data Analyzer within Analytics.Creates a newWaterfallComparisonChartbuilder, the starting point for defining a Waterfall Comparison Chart, one of the chart types available in the Data Analyzer within Analytics.
-
Constructor Details
-
ChartBuilder
public ChartBuilder() -
ChartBuilder
public ChartBuilder(IdGenerator idGenerator, InvocationBuilder<MethodInvocation> invocationBuilder)
-
-
Method Details
-
newScatter
Creates a newScatterChartbuilder, the starting point for defining a Scatter Chart, one of the chart types available in the Data Analyzer within Analytics. Unlike chart types that plot a measure against a category or a time axis, a Scatter Chart plots two independent numeric measures against each other (X and Y), which makes it well suited to visualizing the correlation between two measures, for example order quantity versus invoice price.Add data to the chart with
ScatterChart.addSeries(), then finish the definition withScatterChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newScatter() .addSeries() .setLabel("Revenue vs Quantity") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("Quantity") .back() .setAxisY("InvoicePrice") .back() .back() .build()- Returns:
- a new
ScatterChartinstance. Nevernull. - See Also:
-
newTimeSeriesScatter
Creates a newTimeSeriesScatterChartbuilder, the starting point for defining a Time Series Scatter Chart, one of the chart types available in the Data Analyzer within Analytics. Like aScatterChart, it plots two independent aggregated numeric measures against each other (X and Y). Unlike a Scatter Chart, its X axis is rendered as a date/time axis rather than a plain numeric one, which makes it well suited to visualizing how the relationship between two measures evolves over time, without pre-bucketing the data into fixed periods the waynewTimeSeries()does.Add data to the chart with
TimeSeriesScatterChart.addSeries(), then finish the definition withTimeSeriesScatterChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newTimeSeriesScatter() .addSeries() .setLabel("Order Date vs Margin") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("InvoiceDate") .back() .setAxisY("MarginPercent") .back() .back() .build()- Returns:
- a new
TimeSeriesScatterChartinstance. Nevernull. - See Also:
-
newBarLine
Creates a newBarLineChartbuilder, the starting point for defining a Bar & Line Chart, one of the chart types available in the Data Analyzer within Analytics. Its X axis is a plain category field and its Y axis is one or more aggregated numeric measures, which makes it well suited to comparing a measure across categories, such as revenue by country. Each series can optionally be rendered as a boxplot overlay, sorted along either axis, or compared against a prior period (seeBarLineChartfor those series- and options-level methods).Add data to the chart with
BarLineChart.addSeries(), then finish the definition withBarLineChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newBarLine() .addSeries() .setLabel("Revenue by Country") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("Country") .setAxisY("InvoicePrice") .withTotal() .back() .back() .build()- Returns:
- a new
BarLineChartinstance. Nevernull. - See Also:
-
newBubble
Creates a newBubbleChartbuilder, the starting point for defining a Bubble Chart, one of the chart types available in the Data Analyzer within Analytics. Like aScatterChart, it plots two independent aggregated numeric measures against each other (X and Y). Unlike a Scatter Chart, each data point additionally encodes a third aggregated measure as the size of its bubble marker, set viaBubbleChart.BubbleSeries.setBubbleSize(String), which makes it well suited to comparing three measures at once, for example correlating quantity and price while sizing bubbles by margin.Add data to the chart with
BubbleChart.addSeries(), then finish the definition withBubbleChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newBubble() .addSeries() .setLabel("Quantity vs Price by Margin") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("Quantity") .back() .setAxisY("InvoicePrice") .back() .setBubbleSize("MarginPercent") .back() .back() .build()- Returns:
- a new
BubbleChartinstance. Nevernull. - See Also:
-
newPie
Creates a newPieChartbuilder, the starting point for defining a Pie Chart, one of the chart types available in the Data Analyzer within Analytics. Unlike axis-based chart types, a Pie Chart has no X or Y axis. Each series instead slices an aggregated numeric measure by category: the category field is set withPieChart.PieSeries.setCategories(String)and the measure that determines each slice's size is set withPieChart.PieSeries.setSize(String), which makes it well suited to visualizing a measure's share across a small number of categories, such as revenue by region.Add data to the chart with
PieChart.addSeries(), then finish the definition withPieChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newPie() .addSeries() .setLabel("Revenue by Region") .setDatamart("datamart_transaction") .setCurrency("USD") .setCategories("Region") .setSize("InvoicePrice") .back() .back() .build()- Returns:
- a new
PieChartinstance. Nevernull. - See Also:
-
newWaterfall
Creates a newWaterfallChartbuilder, the starting point for defining a Waterfall Chart, one of the chart types available in the Data Analyzer within Analytics. Unlike other chart types, a Waterfall Chart has exactly one series, obtained withWaterfallChart.getSeries()rather than anaddSeries()method. That series is composed of explicitly added named columns rather than a single aggregated measure: each column is added withWaterfallChart.WaterfallSeries.addWaterfallColumn(WaterfallColumnType, String, String)as either anADDorSUBTRACTstep (an increase or decrease sourced from a field) or aRESULTstep (a running total), which makes it well suited to visualizing how a starting value is built up or drawn down to a final total, for example bridging beginning and ending inventory through receipts and shipments. To compare two such bridges side by side, seenewWaterfallComparison()instead.Finish the definition with
WaterfallChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newWaterfall() .getSeries() .setLabel("Inventory Bridge") .setDatamart("datamart_transaction") .setCurrency("USD") .addWaterfallColumn(WaterfallColumnType.ADD, "Receipts", null) .addWaterfallColumn(WaterfallColumnType.SUBTRACT, "Shipments", null) .addWaterfallColumn(WaterfallColumnType.RESULT, null, "Ending Inventory") .back() .build()- Returns:
- a new
WaterfallChartinstance. Nevernull. - See Also:
-
newWaterfallComparison
Creates a newWaterfallComparisonChartbuilder, the starting point for defining a Waterfall Comparison Chart, one of the chart types available in the Data Analyzer within Analytics. Each series is built the same way as withnewWaterfall(): from named columns added withWaterfallComparisonChart.WaterfallComparisonSeries.addWaterfallColumn(WaterfallColumnType, String, String)as either anADDorSUBTRACTstep or aRESULTrunning total. Unlike a plain Waterfall Chart, which has exactly one series, a Waterfall Comparison Chart supports multiple series added withWaterfallComparisonChart.addSeries(), which makes it well suited to comparing two or more such bridges side by side, for example this year's inventory bridge against last year's.Finish the definition with
WaterfallComparisonChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newWaterfallComparison() .addSeries() .setLabel("This Year") .setDatamart("datamart_transaction") .setCurrency("USD") .addWaterfallColumn(WaterfallColumnType.ADD, "Receipts", null) .addWaterfallColumn(WaterfallColumnType.RESULT, null, "Ending Inventory") .back() .addSeries() .setLabel("Last Year") .setDatamart("datamart_transaction") .setCurrency("USD") .addWaterfallColumn(WaterfallColumnType.ADD, "ReceiptsPriorYear", null) .addWaterfallColumn(WaterfallColumnType.RESULT, null, "Ending Inventory") .back() .build()- Returns:
- a new
WaterfallComparisonChartinstance. Nevernull. - See Also:
-
newTimeSeries
Creates a newTimeSeriesChartbuilder, the starting point for defining a Time Series Chart, one of the chart types available in the Data Analyzer within Analytics. A Time Series Chart plots one or more aggregated numeric measures (the Y axis) against a date/time field (the X axis), which makes it well suited to visualizing a trend, such as revenue over time.Add data to the chart with
TimeSeriesChart.addSeries(), then finish the definition withTimeSeriesChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newTimeSeries() .addSeries() .setLabel("Revenue over Time") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("InvoiceDate") .setAxisY("InvoicePrice") .back() .back() .build()- Returns:
- a new
TimeSeriesChartinstance. Nevernull. - See Also:
-
newDetailedTimeSeries
Creates a newDetailedTimeSeriesChartbuilder, the starting point for defining a Detailed Time Series Chart, one of the chart types available in the Data Analyzer within Analytics. LikenewTimeSeries(), its X axis is a date/time field and its Y axis is an aggregated numeric measure, but a Detailed Time Series Chart plots data points along a continuous date/time axis instead of one point per periodic bucket, and its options additionally support bounding that axis to an explicit date range withDetailedTimeSeriesChart.DetailedTimeSeriesOptions.setXMin(java.util.Date)andDetailedTimeSeriesChart.DetailedTimeSeriesOptions.setXMax(java.util.Date). Each series can also pick its own rendering type, which makes it well suited to overlaying, for example, a line series and a column series on the same continuous timeline.Add data to the chart with
DetailedTimeSeriesChart.addSeries(), then finish the definition withDetailedTimeSeriesChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newDetailedTimeSeries() .addSeries() .setLabel("Revenue over Time") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("InvoiceDate") .setAxisY("InvoicePrice") .back() .back() .build()- Returns:
- a new
DetailedTimeSeriesChartinstance. Nevernull. - See Also:
-
newHistogram
Creates a newHistogramChartbuilder, the starting point for defining a Histogram, one of the chart types available in the Data Analyzer within Analytics. Unlike other chart types, a Histogram has exactly one series, obtained withHistogramChart.getSeries()rather than anaddSeries()method. The X axis is the aggregated numeric measure whose distribution is being visualized, set withHistogramChart.HistogramSeries.setAxisX(String), andHistogramChart.HistogramSeries.setBins(java.math.BigDecimal)controls the approximate number of bins that measure is grouped into, which makes it well suited to visualizing how a measure is distributed across a population, for example how deal sizes are spread across a range of values.Finish the definition with
HistogramChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newHistogram() .getSeries() .setLabel("Deal Size Distribution") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("InvoicePrice") .back() .setBins(20) .setAxisY("Count") .back() .build()- Returns:
- a new
HistogramChartinstance. Nevernull. - See Also:
-
newBoxplot
Creates a newBoxplotChartbuilder, the starting point for defining a Box Plot Chart, one of the chart types available in the Data Analyzer within Analytics. Its X axis is a plain category field, set withBoxplotChart.BoxplotSeries.setAxisX(String), and its Y axis is a Box Plot expression field, set withBoxplotChart.BoxplotSeries.setAxisY(String), which supplies the statistical distribution (minimum, quartiles, maximum) plotted for each category rather than a single aggregated value. The whisker calculation is configurable per series withBoxplotChart.BoxplotSeries.withWhisker(WhiskerType), which makes it well suited to visualizing how a measure's distribution, not just its average, varies across categories, for example price spread by product group.Add data to the chart with
BoxplotChart.addSeries(), then finish the definition withBoxplotChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newBoxplot() .addSeries() .setLabel("Price Spread by Product Group") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("ProductGroup") .setAxisY("InvoicePriceBoxplot") .back() .withWhisker(WhiskerType.OUTLIER_15_IQR) .back() .build()- Returns:
- a new
BoxplotChartinstance. Nevernull. - See Also:
-
newDataTable
Creates a newDataTableChartbuilder, the starting point for defining a Data Table, one of the chart types available in the Data Analyzer within Analytics. Unlike other chart types, a Data Table has no X or Y axis. Its series instead defines the table's rows, grouped by one or more dimensions added withDataTableChart.DataTableSeries.addGroupBy(String), and its columns, each an aggregated measure added withDataTableChart.DataTableSeries.addAdditionalMeasure(), which makes it well suited to presenting a detailed, tabular breakdown of a measure across multiple grouping levels, for example revenue by region and then by product.Add data to the chart with
DataTableChart.addSeries(), then finish the definition withDataTableChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newDataTable() .addSeries() .setLabel("Revenue by Region and Product") .setDatamart("datamart_transaction") .setCurrency("USD") .addGroupBy("Region") .addGroupBy("Product") .addAdditionalMeasure() .setMeasure("InvoicePrice") .back() .back() .build()- Returns:
- a new
DataTableChartinstance. Nevernull. - See Also:
-
newHeatmap
Creates a newHeatmapChartbuilder, the starting point for defining a Heatmap, one of the chart types available in the Data Analyzer within Analytics. Unlike other chart types, a Heatmap has exactly one series, obtained withHeatmapChart.getSeries()rather than anaddSeries()method, and both its X and Y axes are plain category fields, set withHeatmapChart.HeatmapSeries.setAxisX(String)andHeatmapChart.HeatmapSeries.setAxisY(String). The color of each cell in the resulting grid comes from a separate aggregated measure, the color axis, set withHeatmapChart.HeatmapSeries.setColorAxis(String)and configurable as discrete color bands or a continuous gradient viaHeatmapChart.getOptions(), which makes it well suited to visualizing how a measure varies across two categorical dimensions at once, for example revenue by region and product group.Finish the definition with
HeatmapChart.build(). The resulting chart definition is what Dashboard portlets, quote headers, and other Data Analyzer areas render. The same Groovy code is also what the View Expression function generates when a user builds the equivalent chart in the Pricefx UI.This method behaves the same way regardless of execution mode (input generation, syntax check, or distributed calculation). Calling it does not modify any Pricefx data; it only returns a new, independent chart definition builder to continue the fluent chain.
Example:
api.newChartBuilder().newHeatmap() .getSeries() .setLabel("Revenue Heatmap") .setDatamart("datamart_transaction") .setCurrency("USD") .setAxisX("Region") .setAxisY("ProductGroup") .setColorAxis("InvoicePrice") .back() .back() .build()- Returns:
- a new
HeatmapChartinstance. Nevernull. - See Also:
-