Class BarLineChart
Object
ObjectIdentity
AbstractBuilder
- All Implemented Interfaces:
CanDoComparison,CanDoLogarithmicAxis,CanDrillDown,CanZoom,Portlet,Portlet
public class BarLineChart
extends AbstractChartBuilder<BarLineChart>
implements CanDoComparison, CanDoLogarithmicAxis, CanDrillDown, CanZoom
Builder for a Bar & Line Chart, obtained via
ChartBuilder.newBarLine() rather than
instantiated directly. See that factory method for the chart's overall shape (a category X axis, one or
more aggregated Y axis measures) and a Groovy example.
Beyond the axis and series configuration on BarLineChart.BarLineSeries, this chart type supports an embedded
boxplot overlay per series, sorting a series by either axis, and comparing this chart's data against a
prior period, all configured on BarLineChart.BarLineSeries and BarLineChart.BarLineOptions. Clicking a bar can also
fire a Dashboard event via onClick().
Methods of this class are mostly self-explanatory or equivalent to the Highcharts methods described at HighCharts.Chart.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA further measure on aBarLineChart.BarLineSeriesbeyond its primary Y axis measure, obtained fromBarLineChart.BarLineSeries.addAdditionalMeasure()rather than instantiated directly.classThe click-event builder for aBarLineChart, obtained fromonClick()rather than instantiated directly.static classThe Options for aBarLineChart, obtained fromgetOptions()rather than instantiated directly.static classA single series of aBarLineChart, obtained fromaddSeries()rather than instantiated directly. -
Field Summary
Fields inherited from class AbstractChartBuilder
dragDropEnabled, layout, messages, queryBuilderState, resizingEnabledFields inherited from class AbstractBuilder
METHOD_BUILDFields inherited from class ObjectIdentity
classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity -
Constructor Summary
ConstructorsConstructorDescriptionBarLineChart(IdGenerator idGenerator, Invocations<MethodInvocation> invocations) -
Method Summary
Modifier and TypeMethodDescriptionAdds a horizontal, vertical, or stepped reference line to this chart, independent of its data series, for example a fixed target or threshold value.Adds a new series to this chart.ChartBuilderResultbuild()Finishes this chart's definition.booleancanDoLogarithmicAxis(char xyz) Reports that this chart's Y and Z axes, but not its X axis, may be rendered on a logarithmic scale.Returns this chart's Options builder.onClick()Configures a click-triggered Dashboard event fired when a user clicks a bar on this chart.Methods inherited from class AbstractChartBuilder
addInvocation, build, fromQueryBuilderState, getDictionary, getThis, invokeAddSeries, invokeGetOptions, invokeGetSeries, layout, onCellClick, onRowClick, value, withDragDrop, withError, withHeight, withHeight, withInfo, withLabelOverride, withLayout, withLayout, withLayout, withResizing, withTab, withWarning, withWidth, withWidthMethods inherited from class ObjectIdentity
addInvocation, addInvocationInternal, getClassId
-
Constructor Details
-
BarLineChart
public BarLineChart(IdGenerator idGenerator, Invocations<MethodInvocation> invocations)
-
-
Method Details
-
addSeries
Adds a new series to this chart. A Bar & Line Chart can have multiple series, each rendered as its own group of bars or, viaChartSeries.EmbeddedBoxplot.setType(net.pricefx.common.api.chart.SeriesType), a line overlaid on the others.- Returns:
- a new
BarLineChart.BarLineSeriesfor this chart. Nevernull.
-
getOptions
Description copied from class:AbstractChartBuilderReturns this chart's Options builder. Each concrete chart type declares its own Options subclass (for exampleScatterChart.ScatterOptions,BarLineChart.BarLineOptions) exposing the settings that apply to that chart type, such as title, subtitle, and axis label and bound overrides; the exact set of available options differs per chart type, which is why this method is declared abstract here rather than implemented once for every chart.- Specified by:
getOptionsin classAbstractChartBuilder<BarLineChart>- Returns:
- this chart's type-specific
AbstractChartOptionsinstance. Nevernull.
-
addAuxLine
Adds a horizontal, vertical, or stepped reference line to this chart, independent of its data series, for example a fixed target or threshold value. CallAuxLine.withLine(),AuxLine.withSteppedLine(), orAuxLine.withVerticalLine()on the returned builder to choose the line's shape.- Overrides:
addAuxLinein classAbstractChartBuilder<BarLineChart>- Returns:
- a new
AuxLinebuilder for this chart. Nevernull.
-
onClick
Configures a click-triggered Dashboard event fired when a user clicks a bar on this chart. CallBarLineChart.BarLineOnChartClick.triggerEvent(String)on the returned builder, thenBarLineChart.BarLineOnChartClick.BarLineTriggerEvent.withXAsEventDataAttr()to include the clicked bar's X axis category in the event payload.- Returns:
- a new
BarLineChart.BarLineOnChartClickbuilder for this chart. Nevernull. - See Also:
-
build
public ChartBuilderResult build()Finishes this chart's definition. The returned object is what Dashboard portlets, quote headers, and other areas render.- Specified by:
buildin classAbstractBuilder- Returns:
- the finished chart definition. Never
null.
-
canDoLogarithmicAxis
public boolean canDoLogarithmicAxis(char xyz) Reports that this chart's Y and Z axes, but not its X axis, may be rendered on a logarithmic scale.- Specified by:
canDoLogarithmicAxisin interfaceCanDoLogarithmicAxis- Parameters:
xyz- which axis is being asked about;'x','y', or'z'- Returns:
truefor'y'or'z';falsefor'x'or any other value
-