Class AbstractMultiSeries<SERIES extends DataSeriesInternal>
java.lang.Object
com.illumon.iris.db.plot.AbstractSeriesInternal
com.illumon.iris.db.plot.datasets.multiseries.AbstractMultiSeries<SERIES>
- All Implemented Interfaces:
MultiSeries
,MultiSeriesInternal<SERIES>
,PlotExceptionCause
,Series
,SeriesInternal
,TableSnapshotSeries
,TableSnapshotChangeListener
,Serializable
- Direct Known Subclasses:
AbstractSwappableMultiSeries
,AbstractTableMapHandleMultiSeries
,TransformedMultiSeries
public abstract class AbstractMultiSeries<SERIES extends DataSeriesInternal> extends AbstractSeriesInternal implements MultiSeriesInternal<SERIES>, TableSnapshotSeries
Creates and holds a
DataSeriesInternal
for every key in a TableMap
.- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected String[]
byColumns
protected static TableMap
EMPTY_TABLE_MAP
protected boolean
initialized
protected TableMap
tableMap
protected Object
tableMapLock
-
Method Summary
Methods inherited from class com.illumon.iris.db.plot.AbstractSeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, axes, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, id, name, removeTableHandle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.plot.datasets.multiseries.MultiSeriesInternal
applyTransform, axes, copy, createSeries, getPlotInfo, getQueryProcessorConnection, getTableMap, getX, getY, id, name
Methods inherited from interface com.illumon.iris.db.plot.SeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, onInflate, removeTableHandle
Methods inherited from interface com.illumon.iris.db.plot.TableSnapshotSeries
notifyTableSnapshotChanged
-
Field Details
-
EMPTY_TABLE_MAP
-
byColumns
-
tableMapLock
-
tableMap
-
initialized
protected boolean initialized
-
-
Method Details
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
-
chart
Description copied from interface:MultiSeriesInternal
Gets the chart on which this data will be plotted.- Specified by:
chart
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Returns:
- chart on which this data will be plotted
-
setAddTo
-
getDynamicSeriesNamer
Description copied from interface:MultiSeriesInternal
Gets a utility to make certain that all dynamic series have unique names.- Specified by:
getDynamicSeriesNamer
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Returns:
- utility to make certain that all dynamic series have unique names.
-
setDynamicSeriesNamer
- Specified by:
setDynamicSeriesNamer
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
-
getByColumns
Description copied from interface:MultiSeriesInternal
Gets the by columns for the multi-series.- Specified by:
getByColumns
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Returns:
- by columns for the multi-series.
-
seriesNamingFunction
Description copied from interface:MultiSeries
Defines the procedure to name a generated series. The input of the naming function is the table map key corresponding to the new series.- Specified by:
seriesNamingFunction
in interfaceMultiSeries
- Parameters:
namingFunction
- series naming function
-
seriesNamingFunction
public AbstractMultiSeries<SERIES> seriesNamingFunction(groovy.lang.Closure<String> namingFunction)Description copied from interface:MultiSeries
Defines the procedure to name a generated series. The input of the naming function is the table map key corresponding to the new series.- Specified by:
seriesNamingFunction
in interfaceMultiSeries
- Parameters:
namingFunction
- series naming closure
-
applyNamingFunction
protected void applyNamingFunction()This is used by super classes so we can call applyNamingFunction during construction without NPEs -
applyFunction
Applies thefunction
to the given input of the underlying table to create a new columncolumnName
. -
applyFunction
protected void applyFunction(Function function, String columnName, String functionInput, Class resultClass)Applies thefunction
to the byColumns of the underlying table to create a new columncolumnName
. -
init
Description copied from interface:MultiSeriesInternal
Initializes this multi-series.- Specified by:
init
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
-
init
- Specified by:
init
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
-
allowInitialization
public void allowInitialization()Description copied from interface:MultiSeriesInternal
Initialization will only be allowed after a Figure show() or save()- Specified by:
allowInitialization
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
-
initializeSeries
Description copied from interface:MultiSeriesInternal
Assigns series modifiers, e.g. point color, to the givenseries
- Specified by:
initializeSeries
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Parameters:
series
- series to initialize
-
addSeries
Description copied from interface:MultiSeriesInternal
Add the given series to this MultiSeries- Specified by:
addSeries
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Parameters:
series
- serieskey
- key used to determine the name of theseries
-
get
Description copied from interface:MultiSeriesInternal
Gets the specified series from this multi-series.- Specified by:
get
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Parameters:
series
- series index- Returns:
- specified series
-
getSeriesCount
public int getSeriesCount()Description copied from interface:MultiSeriesInternal
Gets the number of series in this multi-series.- Specified by:
getSeriesCount
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Returns:
- number of series in this multi-series
-
notifySeriesChangeListeners
public void notifySeriesChangeListeners(boolean incremental)Description copied from interface:MultiSeriesInternal
Fire a series change event.- Specified by:
notifySeriesChangeListeners
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Parameters:
incremental
- whether the series change is additive
-
addSeriesChangeListener
Description copied from interface:MultiSeriesInternal
Add a series change listener.- Specified by:
addSeriesChangeListener
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Parameters:
listener
- series change listener
-
createSeries
Description copied from interface:MultiSeriesInternal
Creates a new series for this multi-series.- Specified by:
createSeries
in interfaceMultiSeriesInternal<SERIES extends DataSeriesInternal>
- Parameters:
seriesName
- name for the seriest
- client side source table- Returns:
- new series for this multi-series
-
setUpSnapshot
-
onClose
public void onClose()Description copied from interface:SeriesInternal
Series shut down after the plot is closed.- Specified by:
onClose
in interfaceSeriesInternal
-
pointColorByY
public <T extends Paint> AbstractMultiSeries<SERIES> pointColorByY(groovy.lang.Closure<T> colors, Object... keys)- Specified by:
pointColorByY
in interfaceMultiSeries
-
pointColorByY
public <T extends Paint> AbstractMultiSeries<SERIES> pointColorByY(Function<Double,T> colors, Object... keys)- Specified by:
pointColorByY
in interfaceMultiSeries
-
pointColor
public <COLOR extends Paint> AbstractMultiSeries<SERIES> pointColor(groovy.lang.Closure<COLOR> colors, Object... keys)- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
public <COLOR extends Paint> AbstractMultiSeries<SERIES> pointColor(Function<Comparable,COLOR> colors, Object... keys)- Specified by:
pointColor
in interfaceMultiSeries
-
pointColorInteger
public <COLOR extends Integer> AbstractMultiSeries<SERIES> pointColorInteger(groovy.lang.Closure<COLOR> colors, Object... keys)- Specified by:
pointColorInteger
in interfaceMultiSeries
-
pointColorInteger
public <COLOR extends Integer> AbstractMultiSeries<SERIES> pointColorInteger(Function<Comparable,COLOR> colors, Object... keys)- Specified by:
pointColorInteger
in interfaceMultiSeries
-
pointLabel
public <LABEL> AbstractMultiSeries<SERIES> pointLabel(groovy.lang.Closure<LABEL> labels, Object... keys)- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabel
public <LABEL> AbstractMultiSeries<SERIES> pointLabel(Function<Comparable,LABEL> labels, Object... keys)- Specified by:
pointLabel
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointSize
public <NUMBER extends Number> AbstractMultiSeries<SERIES> pointSize(groovy.lang.Closure<NUMBER> factors, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public <NUMBER extends Number> AbstractMultiSeries<SERIES> pointSize(Function<Comparable,NUMBER> factors, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
errorBarColor
- Specified by:
errorBarColor
in interfaceMultiSeries
-
errorBarColor
- Specified by:
errorBarColor
in interfaceMultiSeries
-
errorBarColor
- Specified by:
errorBarColor
in interfaceMultiSeries
-
gradientVisible
- Specified by:
gradientVisible
in interfaceMultiSeries
-
lineColor
- Specified by:
lineColor
in interfaceMultiSeries
-
lineColor
- Specified by:
lineColor
in interfaceMultiSeries
-
lineColor
- Specified by:
lineColor
in interfaceMultiSeries
-
lineStyle
- Specified by:
lineStyle
in interfaceMultiSeries
-
linesVisible
- Specified by:
linesVisible
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointLabel
- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabelFormat
- Specified by:
pointLabelFormat
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointsVisible
- Specified by:
pointsVisible
in interfaceMultiSeries
-
seriesColor
- Specified by:
seriesColor
in interfaceMultiSeries
-
seriesColor
- Specified by:
seriesColor
in interfaceMultiSeries
-
seriesColor
- Specified by:
seriesColor
in interfaceMultiSeries
-
toolTipPattern
- Specified by:
toolTipPattern
in interfaceMultiSeries
-
xToolTipPattern
- Specified by:
xToolTipPattern
in interfaceMultiSeries
-
yToolTipPattern
- Specified by:
yToolTipPattern
in interfaceMultiSeries
-
group
- Specified by:
group
in interfaceMultiSeries
-
piePercentLabelFormat
- Specified by:
piePercentLabelFormat
in interfaceMultiSeries
-
pointColor
public <CATEGORY extends Comparable, COLOR extends Paint> AbstractMultiSeries<SERIES> pointColor(Map<CATEGORY,COLOR> colors, Object... keys)- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
public AbstractMultiSeries<SERIES> pointColor(SelectableDataSet sds, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
public AbstractMultiSeries<SERIES> pointColor(Table t, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointColor
in interfaceMultiSeries
-
pointColorByY
public <T extends Paint> AbstractMultiSeries<SERIES> pointColorByY(Map<Double,T> colors, Object... keys)- Specified by:
pointColorByY
in interfaceMultiSeries
-
pointColorInteger
public <CATEGORY extends Comparable, COLOR extends Integer> AbstractMultiSeries<SERIES> pointColorInteger(Map<CATEGORY,COLOR> colors, Object... keys)- Specified by:
pointColorInteger
in interfaceMultiSeries
-
pointLabel
public <CATEGORY extends Comparable, LABEL> AbstractMultiSeries<SERIES> pointLabel(Map<CATEGORY,LABEL> labels, Object... keys)- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabel
- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabel
public AbstractMultiSeries<SERIES> pointLabel(SelectableDataSet sds, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabel
public AbstractMultiSeries<SERIES> pointLabel(Table t, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointLabel
in interfaceMultiSeries
-
pointShape
public <CATEGORY extends Comparable> AbstractMultiSeries<SERIES> pointShape(Map<CATEGORY,String> shapes, Object... keys)- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
public AbstractMultiSeries<SERIES> pointShape(SelectableDataSet sds, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
public AbstractMultiSeries<SERIES> pointShape(Table t, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointShape
in interfaceMultiSeries
-
pointSize
public <CATEGORY extends Comparable, NUMBER extends Number> AbstractMultiSeries<SERIES> pointSize(Map<CATEGORY,NUMBER> factors, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public <CATEGORY extends Comparable, NUMBER extends Number> AbstractMultiSeries<SERIES> pointSize(CATEGORY[] categories, NUMBER[] factors, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public <CATEGORY extends Comparable> AbstractMultiSeries<SERIES> pointSize(CATEGORY[] categories, double[] factors, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public <CATEGORY extends Comparable> AbstractMultiSeries<SERIES> pointSize(CATEGORY[] categories, int[] factors, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public <CATEGORY extends Comparable> AbstractMultiSeries<SERIES> pointSize(CATEGORY[] categories, long[] factors, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public AbstractMultiSeries<SERIES> pointSize(SelectableDataSet sds, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public AbstractMultiSeries<SERIES> pointSize(Table t, String keyColumn, String valueColumn, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
public <T extends Paint> AbstractMultiSeries<SERIES> pointColor(IndexableData<T> colors, Object... keys)- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
public AbstractMultiSeries<SERIES> pointColor(SelectableDataSet sds, String columnName, Object... keys)- Specified by:
pointColor
in interfaceMultiSeries
-
pointColor
- Specified by:
pointColor
in interfaceMultiSeries
-
pointColorInteger
public AbstractMultiSeries<SERIES> pointColorInteger(IndexableData<Integer> colors, Object... keys)- Specified by:
pointColorInteger
in interfaceMultiSeries
-
pointLabel
- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabel
- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabel
public AbstractMultiSeries<SERIES> pointLabel(SelectableDataSet sds, String columnName, Object... keys)- Specified by:
pointLabel
in interfaceMultiSeries
-
pointLabel
- Specified by:
pointLabel
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
public AbstractMultiSeries<SERIES> pointShape(SelectableDataSet sds, String columnName, Object... keys)- Specified by:
pointShape
in interfaceMultiSeries
-
pointShape
- Specified by:
pointShape
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
public AbstractMultiSeries<SERIES> pointSize(SelectableDataSet sds, String columnName, Object... keys)- Specified by:
pointSize
in interfaceMultiSeries
-
pointSize
- Specified by:
pointSize
in interfaceMultiSeries
-