Package net.pricefx.common.apibuilder.chart
BarLineChart, PieChart, WaterfallChart,
TimeSeriesChart and HeatmapChart, produce Data Analyzer chart definitions
backed by the Highcharts library; their methods are mostly equivalent to the Highcharts
options described at
Highcharts.Chart.
Entry point: obtained through api.newChartBuilder(); see
PublicGroovyAPI.newChartBuilder(). The returned
ChartBuilder has one factory method per chart type, such as newBarLine(),
newPie() or newWaterfall(). A typical chain adds one or more series with
addSeries(), configures axes and measures on the series, returns to the parent
builder with back(), and finishes with build(). The build result is the
object the user interface renders in Dashboard portlets, Quote headers and other areas.
A practical starting point is to build the chart in the Data Analyzer user interface and
use its View Expression function, which displays the generated builder code for
the chart; the generated code can then be refined with these builders.
All chart builders extend AbstractChartBuilder, which carries the portlet
layout options (width, height, layout) shared by every chart type. The enums and constants
consumed by these builders (chart types, aggregation formulas, filter operators) live in
the net.pricefx.common.api.chart package.
- See Also:
-
ClassesClassDescriptionAbstractChartBuilder<C extends AbstractChartBuilder<C>>Common base class for every chart definition builder returned by
ChartBuilder, such asScatterChart,TimeSeriesChart, andBarLineChart.Common base class for the click-event configuration builders returned byAbstractChartBuilder.onRowClick()andAbstractChartBuilder.onCellClick(), and by each concrete chart type's ownonClick()method, for exampleScatterChart.onClick().Common base class for the "additional measure" builders returned by a concrete series type's ownaddAdditionalMeasure()method, for exampleScatterChart.ScatterAdditionalMeasureorBarLineChart.BarLineAdditionalMeasure.Common base class for the Options object returned by every chart type'sAbstractChartBuilder.getOptions(), for exampleScatterChart.ScatterOptionsorBarLineChart.BarLineOptions.Common base class for the series builders returned by every chart type'saddSeries()orgetSeries()method, for exampleScatterChart.ScatterSeriesorBarLineChart.BarLineSeries.AuxLine<C extends AbstractChartBuilder<C>>Builder for an auxiliary reference line on a chart, obtained fromAbstractChartBuilder.addAuxLine()rather than instantiated directly.AuxLine.Line<C extends ObjectIdentity>A straightAuxLineshape,y = yIntercept + steepness * x, obtained fromAuxLine.withLine()rather than instantiated directly.AuxLine.SteppedLine<C extends ObjectIdentity>A piecewiseAuxLineshape defined by explicit (X, Y) points, obtained fromAuxLine.withSteppedLine()rather than instantiated directly.AuxLine.VerticalLine<C extends ObjectIdentity>A single verticalAuxLineshape at a fixed X axis value, obtained fromAuxLine.withVerticalLine()rather than instantiated directly.Builder for a Bar & Line Chart, obtained viaChartBuilder.newBarLine()rather than instantiated directly.A further measure on aBarLineChart.BarLineSeriesbeyond its primary Y axis measure, obtained fromBarLineChart.BarLineSeries.addAdditionalMeasure()rather than instantiated directly.The Options for aBarLineChart, obtained fromBarLineChart.getOptions()rather than instantiated directly.A single series of aBarLineChart, obtained fromBarLineChart.addSeries()rather than instantiated directly.Builder for a Box Plot Chart, obtained viaChartBuilder.newBoxplot()rather than instantiated directly.A further measure on aBoxplotChart.BoxplotSeriesbeyond its primary Y axis Box Plot expression, obtained fromBoxplotChart.BoxplotSeries.addAdditionalMeasure()rather than instantiated directly.The Options for aBoxplotChart, obtained fromBoxplotChart.getOptions()rather than instantiated directly.A single series of aBoxplotChart, obtained fromBoxplotChart.addSeries()rather than instantiated directly.Builder for a Bubble Chart, obtained viaChartBuilder.newBubble()rather than instantiated directly.A further measure on aBubbleChart.BubbleSeriesbeyond its X axis, Y axis, and bubble size measures, obtained fromBubbleChart.BubbleSeries.addAdditionalMeasure()rather than instantiated directly.The Options for aBubbleChart, obtained fromBubbleChart.getOptions()rather than instantiated directly.A single series of aBubbleChart, obtained fromBubbleChart.addSeries()rather than instantiated directly.The bubble size measure of aBubbleChart.BubbleSeries, obtained fromBubbleChart.BubbleSeries.setBubbleSize(String)rather than instantiated directly.Namespace holding the concrete click-event builders for chart Dashboard events:ChartEvents.OnChartClick(a chart-type-specificonClick(), for exampleScatterChart.onClick()),ChartEvents.OnRowClick(fromAbstractChartBuilder.onRowClick()), andChartEvents.OnCellClick(fromAbstractChartBuilder.onCellClick()).ChartEvents.OnCellClick<C extends AbstractChartBuilder<?>>The click-event builder for a cell click on a chart's Data tab, obtained fromAbstractChartBuilder.onCellClick()rather than instantiated directly.Base class for a chart-type-specificonClick()click-event builder, for exampleScatterChart.ScatterOnChartClickorBarLineChart.BarLineOnChartClick.ChartEvents.OnRowClick<C extends AbstractChartBuilder<?>>The click-event builder for a row click on a chart's Data tab, obtained fromAbstractChartBuilder.onRowClick()rather than instantiated directly.Namespace holding the three intermediate tiers that select which ofAbstractChartMeasures' optional methods a concrete additional-measure type re-exposes aspublic:ChartMeasures.Basic(aggregation formula selection),ChartMeasures.Type(adds per-measure rendering type and Z axis placement, extendsBasic), andChartMeasures.EmbeddedBoxplot(adds embedded boxplot overlay support, extendsType).Re-exposesAbstractChartMeasures.withAggregation(String),AbstractChartMeasures.withAggregation(net.pricefx.common.api.chart.AggregationFormula),AbstractChartMeasures.withFormula(),AbstractChartMeasures.withPercent(),AbstractChartMeasures.withPerUnit(),AbstractChartMeasures.withAverage(), andAbstractChartMeasures.withTotal()aspublic; the tier extended by a concrete additional-measure type that supports none ofChartMeasures.Type's orChartMeasures.EmbeddedBoxplot's further options, for exampleScatterChart.ScatterAdditionalMeasureorPieChart.PieAdditionalMeasure.ChartMeasures.EmbeddedBoxplot<S extends AbstractChartSeries<?,S>, M extends ChartMeasures.EmbeddedBoxplot<S, M>> Re-exposesAbstractChartMeasures.withBoxplotField()andAbstractChartMeasures.withBoxplotExpression()aspublic, on top of everythingChartMeasures.Typeexposes; the tier extended by a concrete additional-measure type whose series supports an embedded box plot overlay, for exampleBarLineChart.BarLineAdditionalMeasureorTimeSeriesChart.TimeSeriesAdditionalMeasure.Re-exposesAbstractChartMeasures.setType(net.pricefx.common.api.chart.SeriesType)andAbstractChartMeasures.setOnZAxis(Boolean)aspublic, on top of everythingChartMeasures.Basicexposes; the tier extended by a concrete additional-measure type that can render itself differently from its series' primary measure or plot itself on a Z axis, for exampleHistogramChart.HistogramAdditionalMeasureorDetailedTimeSeriesChart.DetailedTimeSeriesAdditionalMeasure.Namespace holding the five intermediate tiers that select which ofAbstractChartOptions' optional methods a concrete chart type's Options class re-exposes aspublic:ChartOptions.Basic(title, subtitle, legend, tooltips),ChartOptions.XYLabels(adds X/Y axis labels, extendsBasic),ChartOptions.XYMinMax(adds X/Y numeric bounds, extendsXYLabels),ChartOptions.ZAxis(adds Y bounds, a Z axis, and period comparison, extendsXYLabelsindependently ofXYMinMax), andChartOptions.EmbeddedBoxplot(adds embedded boxplot axis bounds, extendsZAxis).Re-exposesAbstractChartOptions.setTitle(String),AbstractChartOptions.setSubtitle(String),AbstractChartOptions.setHideLegend(Boolean), andAbstractChartOptions.setHideTooltips(Boolean)aspublic; the tier extended by a concrete Options type that supports none of this class's more specific tiers, for exampleWaterfallChart.WaterfallOptionsorWaterfallComparisonChart.WaterfallComparisonOptions.ChartOptions.EmbeddedBoxplot<C extends AbstractChartBuilder<C>,O extends ChartOptions.EmbeddedBoxplot<C, O>> Re-exposesAbstractChartOptions.setBoxplotAxisLabel(String),AbstractChartOptions.setBoxplotAxisMin(BigDecimal), andAbstractChartOptions.setBoxplotAxisMax(BigDecimal)aspublic, on top of everythingChartOptions.ZAxisexposes; the tier extended by a concrete Options type whose series supports an embedded box plot overlay, for exampleBarLineChart.BarLineOptionsorTimeSeriesChart.TimeSeriesOptions.Re-exposesAbstractChartOptions.setXLabel(String)andAbstractChartOptions.setYLabel(String)aspublic, on top of everythingChartOptions.Basicexposes; the tier extended by a concrete Options type that labels its X and Y axes but supports neitherChartOptions.XYMinMax's norChartOptions.ZAxis's further bounds, for exampleHeatmapChart.HeatmapOptionsorPieChart.PieOptions.Re-exposesAbstractChartOptions.setXMin(BigDecimal),AbstractChartOptions.setXMax(BigDecimal),AbstractChartOptions.setYMin(BigDecimal), andAbstractChartOptions.setYMax(BigDecimal)aspublic, on top of everythingChartOptions.XYLabelsexposes; the tier extended by a concrete Options type whose X and Y axes are both plain numeric scales worth bounding, for exampleScatterChart.ScatterOptionsorBubbleChart.BubbleOptions.Re-exposesAbstractChartOptions.setYMin(BigDecimal),AbstractChartOptions.setYMax(BigDecimal),AbstractChartOptions.setShowZAxis(Boolean),AbstractChartOptions.setZLabel(String),AbstractChartOptions.setZMin(BigDecimal),AbstractChartOptions.setZMax(BigDecimal), andAbstractChartOptions.setComparison(Boolean)aspublic, on top of everythingChartOptions.XYLabelsexposes; the tier extended by a concrete Options type with a Z axis or period comparison but no X axis bounds, for exampleBoxplotChart.BoxplotOptionsorHistogramChart.HistogramOptions.Namespace holding the three intermediate tiers that select which ofAbstractChartSeries' optional methods a concrete series type re-exposes aspublic:ChartSeries.Basic(the methods common to nearly every series),ChartSeries.EmbeddedBoxplot(adds an embedded boxplot overlay, extendsBasic), andChartSeries.Aggregation(adds aggregation-by/band-by grouping, also extendsBasic).Re-exposesAbstractChartSeries.setAggregationBy(String),AbstractChartSeries.setBandBy(String), andAbstractChartSeries.setShowBandByLegend(Boolean)aspublic, and addsChartSeries.Aggregation.getBandByOptions(); the tier extended by a concrete series type that supports aggregation-by and band-by grouping, for exampleScatterChart.ScatterSeriesorBubbleChart.BubbleSeries.Re-exposesAbstractChartSeries.setHideDataLabels(Boolean)aspublic; the tier extended by a concrete series type that supports hiding data labels but none ofChartSeries.EmbeddedBoxplot's orChartSeries.Aggregation's further options.Re-exposesAbstractChartSeries.setType(SeriesType),AbstractChartSeries.setShowBoxplot(Boolean),AbstractChartSeries.setBoxplotAxis(), andAbstractChartSeries.setWhisker(WhiskerType)aspublic; the tier extended by a concrete series type that supports an embedded box plot overlay, for exampleBarLineChart.BarLineSeriesorTimeSeriesChart.TimeSeriesSeries.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Dictionary<C extends AbstractChartBuilder<C>>Builder for a chart's Dictionary, the Data Analyzer panel that controls formatting of dates, numbers, and other display labels (see the Dictionary option in the Data Analyzer UI), obtained fromAbstractChartBuilder.getDictionary()rather than instantiated directly.Expression<O extends ObjectIdentity>Filters<O extends ObjectIdentity>Builder for a Heatmap, obtained viaChartBuilder.newHeatmap()rather than instantiated directly.A further measure on aHeatmapChart.HeatmapSeriesbeyond its color axis measure, obtained fromHeatmapChart.HeatmapSeries.addAdditionalMeasure()rather than instantiated directly.Builder for aHeatmapChart's continuous color gradient (ColorAxisType.INTERPOLATED), obtained fromHeatmapChart.HeatmapOptions.withInterpolatedColorAxis()rather than instantiated directly.The Options for aHeatmapChart, obtained fromHeatmapChart.getOptions()rather than instantiated directly.Builder for aHeatmapChart's discrete, banded color axis (ColorAxisType.RANGED), obtained fromHeatmapChart.HeatmapOptions.withRangedColorAxis()rather than instantiated directly.The single series of aHeatmapChart, obtained fromHeatmapChart.getSeries()rather than instantiated directly.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.