Package net.pricefx.common.apibuilder.chart


package net.pricefx.common.apibuilder.chart
Fluent builders for chart definitions rendered by the Pricefx user interface. The concrete builder types, for example 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: