Class AbstractXYDataSeries
java.lang.Object
com.illumon.iris.db.plot.AbstractSeriesInternal
com.illumon.iris.db.plot.datasets.AbstractDataSeries
com.illumon.iris.db.plot.datasets.xy.AbstractXYDataSeries
- All Implemented Interfaces:
DataSeries
,DataSeriesInternal
,ValidatingDataSeries
,XYDataSeries
,XYDataSeriesInternal
,PlotExceptionCause
,Series
,SeriesInternal
,Serializable
- Direct Known Subclasses:
OHLCDataSeriesArray
,XYDataSeriesArray
,XYDataSeriesFunctionImpl
public abstract class AbstractXYDataSeries
extends AbstractDataSeries
implements XYDataSeriesInternal
Base class for the
XYDataSeriesInternal
.- See Also:
-
Field Summary
Fields inherited from class com.illumon.iris.db.plot.AbstractSeriesInternal
dataChangeListener
-
Constructor Summary
ConstructorsModifierConstructorDescriptionAbstractXYDataSeries
(AxesImpl axes, int id, Comparable name, AbstractXYDataSeries series) Creates an AbstractXYDataSeries instance.protected
AbstractXYDataSeries
(AbstractXYDataSeries series, AxesImpl axes) Creates a copy of a series using a different Axes and a different listener. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
colorsSetSpecific
(IndexableData<Paint> data) errorBarColor
(int color) Sets the error barPaint
for this dataset.errorBarColor
(Paint color) Sets the error barPaint
for this dataset.errorBarColor
(String color) Sets the error barPaint
for this dataset.getPointColor
(int i) Gets the color of the data point at indexi
.getPointLabel
(int i) Gets the label of the data point at indexi
.getPointShape
(int i) Gets the shape of the data point at indexi
.getPointSize
(int i) Gets the size of the data point at indexi
.Gets the series color.gradientVisible
(boolean visible) Sets whether bar gradients are visible.lineColor
(int color) Defines the default line color.Defines the default line color.Defines the default line color.Sets the line style.linesVisible
(Boolean visible) Sets whether lines are visible.void
onClose()
Series shut down after the plot is closed.pointColor
(int color) Sets the point color.pointColor
(int... colors) Sets the point color.<T extends Paint>
AbstractXYDataSeriespointColor
(IndexableData<T> colors) Sets the point color.pointColor
(SelectableDataSet sds, String columnName) Sets the point color.pointColor
(Table t, String columnName) Sets the point color.pointColor
(Paint color) Sets the point color.pointColor
(Paint... colors) Sets the point color.pointColor
(Integer... colors) Sets the point color.pointColor
(String color) Sets the point color.pointColor
(String... colors) Sets the point color.<T extends Paint>
AbstractXYDataSeriespointColorByY
(groovy.lang.Closure<T> colors) Sets the point color for a data point based upon the y-value.<T extends Paint>
AbstractXYDataSeriespointColorByY
(Function<Double, T> colors) Sets the point color for a data point based upon the y-value.pointColorInteger
(IndexableData<Integer> colors) Sets the point color.pointLabel
(IndexableData<?> labels) Sets the point label for data point i from index i of the input labels.pointLabel
(SelectableDataSet sds, String columnName) Sets the point label for data point i from index i of the input labels.pointLabel
(Table t, String columnName) Sets the point label for data point i from index i of the input labels.pointLabel
(Object label) Sets the point label for data point i from index i of the input labels.pointLabel
(Object... labels) Sets the point label for data point i from index i of the input labels.pointLabelFormat
(String format) Sets the point label format.pointShape
(IndexableData<String> shapes) Sets the point shapes for data point i from index i of the input labels.pointShape
(SelectableDataSet sds, String columnName) Sets the point shapes for data point i from index i of the input labels.pointShape
(Table t, String columnName) Sets the point shapes for data point i from index i of the input labels.pointShape
(Shape shape) Sets the point shapes for data point i from index i of the input labels.pointShape
(Shape... shapes) Sets the point shapes for data point i from index i of the input labels.pointShape
(String shape) Sets the point shapes for data point i from index i of the input labels.pointShape
(String... shapes) Sets the point shapes for data point i from index i of the input labels.pointSize
(double factor) Sets the point size.pointSize
(double... factors) Sets the point size.pointSize
(int factor) Sets the point size.pointSize
(int... factors) Sets the point size.pointSize
(long factor) Sets the point size.pointSize
(long... factors) Sets the point size.pointSize
(IndexableData<Double> factors) Sets the point size.pointSize
(SelectableDataSet sds, String columnName) Sets the point size.Sets the point size.Sets the point size.<T extends Number>
AbstractXYDataSeriespointSize
(T[] factors) Sets the point size.pointsVisible
(Boolean visible) Sets whether points are visible.seriesColor
(int color) Defines the default line and point color.seriesColor
(Paint color) Defines the default line and point color.seriesColor
(String color) Defines the default line and point color.protected void
toolTipPattern
(String format) Sets the tooltip format.void
validate()
Validate the data series.xToolTipPattern
(String format) Sets the x-value tooltip format.yToolTipPattern
(String format) Sets the y-value tooltip format.Methods inherited from class com.illumon.iris.db.plot.datasets.AbstractDataSeries
chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, setErrorBarColor, setErrorBarColor, setErrorBarColor, setGradientVisible, setLineColor, setLineColor, setLineColor, setLineStyle, setLinesVisible, setPointLabelFormat, setPointsVisible, setXToolTipPattern, setYToolTipPattern
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.DataSeriesInternal
axes, chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPlotInfo, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, id, name, size
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.datasets.xy.XYDataSeriesInternal
copy, createSnapshot, drawXError, drawYError, getEndX, getEndY, getStartX, getStartY, getX, getXRange, getY, getYRange, sort
-
Constructor Details
-
AbstractXYDataSeries
Creates an AbstractXYDataSeries instance.- Parameters:
axes
- axes on which the data will be plottedid
- data series idname
- series name
-
AbstractXYDataSeries
Creates a copy of a series using a different Axes and a different listener.- Parameters:
series
- series to copy.axes
- new axes to use.
-
-
Method Details
-
validate
Description copied from interface:ValidatingDataSeries
Validate the data series.- Specified by:
validate
in interfaceValidatingDataSeries
- Throws:
PlotIllegalStateException
-
colorsSetSpecific
-
snapshotModifiers
-
getSeriesColor
Description copied from interface:DataSeriesInternal
Gets the series color.- Specified by:
getSeriesColor
in interfaceDataSeriesInternal
- Returns:
- series color
-
getPointLabel
Description copied from interface:XYDataSeriesInternal
Gets the label of the data point at indexi
.- Specified by:
getPointLabel
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- label of this data point at index
i
-
getPointShape
Description copied from interface:XYDataSeriesInternal
Gets the shape of the data point at indexi
.- Specified by:
getPointShape
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- shape of this data point at index
i
-
getPointSize
Description copied from interface:XYDataSeriesInternal
Gets the size of the data point at indexi
.- Specified by:
getPointSize
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- size of this data point at index
i
-
getPointColor
Description copied from interface:XYDataSeriesInternal
Gets the color of the data point at indexi
.- Specified by:
getPointColor
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- color of this data point at index
i
-
linesVisible
Description copied from interface:DataSeries
Sets whether lines are visible.- Specified by:
linesVisible
in interfaceDataSeries
- Parameters:
visible
- line visibility- Returns:
- this data series.
-
pointsVisible
Description copied from interface:DataSeries
Sets whether points are visible.- Specified by:
pointsVisible
in interfaceDataSeries
- Parameters:
visible
- point visibility- Returns:
- this data series.
-
gradientVisible
Description copied from interface:DataSeries
Sets whether bar gradients are visible.- Specified by:
gradientVisible
in interfaceDataSeries
- Parameters:
visible
- bar gradient visibility- Returns:
- this data series.
-
lineColor
Description copied from interface:DataSeries
Defines the default line color.- Specified by:
lineColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
lineColor
Description copied from interface:DataSeries
Defines the default line color.- Specified by:
lineColor
in interfaceDataSeries
- Parameters:
color
- color palette index- Returns:
- this data series.
-
lineColor
Description copied from interface:DataSeries
Defines the default line color.- Specified by:
lineColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
errorBarColor
Description copied from interface:DataSeries
Sets the error barPaint
for this dataset.- Specified by:
errorBarColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this DataSeries
-
errorBarColor
Description copied from interface:DataSeries
Sets the error barPaint
for this dataset.- Specified by:
errorBarColor
in interfaceDataSeries
- Parameters:
color
- index of the color in the series color palette- Returns:
- this DataSeries
-
errorBarColor
Description copied from interface:DataSeries
Sets the error barPaint
for this dataset.- Specified by:
errorBarColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this DataSeries
-
lineStyle
Description copied from interface:DataSeries
Sets the line style.- Specified by:
lineStyle
in interfaceDataSeries
- Parameters:
style
- style- Returns:
- this data series.
-
seriesColor
Description copied from interface:DataSeries
Defines the default line and point color.- Specified by:
seriesColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
seriesColor
Description copied from interface:DataSeries
Defines the default line and point color.- Specified by:
seriesColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
seriesColor
Description copied from interface:DataSeries
Defines the default line and point color.- Specified by:
seriesColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
pointSize
Description copied from interface:DataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceDataSeries
- Parameters:
factor
- point size- Returns:
- this data series.
-
pointSize
Description copied from interface:DataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceDataSeries
- Parameters:
factor
- point size- Returns:
- this data series.
-
pointSize
Description copied from interface:DataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceDataSeries
- Parameters:
factor
- point size- Returns:
- this data series.
-
pointSize
Description copied from interface:DataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceDataSeries
- Parameters:
factor
- point size- Returns:
- this data series.
-
pointSize
Description copied from interface:XYDataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceXYDataSeries
- Parameters:
factors
- factors to multiply the default size (1) by- Returns:
- this XYDataSeries
-
pointSize
Description copied from interface:XYDataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceXYDataSeries
- Parameters:
factors
- factors to multiply the default size (1) by- Returns:
- this XYDataSeries
-
pointSize
Description copied from interface:XYDataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceXYDataSeries
- Parameters:
factors
- factors to multiply the default size (1) by- Returns:
- this XYDataSeries
-
pointSize
Description copied from interface:XYDataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceXYDataSeries
- Parameters:
factors
- factors to multiply the default size (1) by- Returns:
- this XYDataSeries
-
pointSize
Description copied from interface:XYDataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceXYDataSeries
- Type Parameters:
T
- data type of thefactors
- Parameters:
factors
- factors to multiply the default size (1) by- Returns:
- this XYDataSeries
-
pointSize
Description copied from interface:XYDataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceXYDataSeries
- Parameters:
t
- table containing factors to multiply the default size (1) bycolumnName
- column int
containing size scaling factors. The size data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointSize
Description copied from interface:XYDataSeries
Sets the point size. A scale factor of 1 is the default size. A scale factor of 2 is 2x the default size. Unspecified points use the default size.- Specified by:
pointSize
in interfaceXYDataSeries
- Parameters:
sds
- selectable data set (e.g. OneClick filterable table) containing factors to multiply the default size (1) bycolumnName
- column insds
containing size scaling factors. The size data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointColor
Description copied from interface:DataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
pointColor
Description copied from interface:DataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
pointColor
Description copied from interface:DataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceDataSeries
- Parameters:
color
- color- Returns:
- this data series.
-
pointColor
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceXYDataSeries
- Type Parameters:
T
- data type of thecolors
- Parameters:
colors
- colors. The color for data point i comes from index i.- Returns:
- this XYDataSeries
-
pointColor
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceXYDataSeries
- Parameters:
colors
- colors. The color for data point i comes from index i.- Returns:
- this XYDataSeries
-
pointColorInteger
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColorInteger
in interfaceXYDataSeries
- Parameters:
colors
- colors. The color for data point i comes from index i.- Returns:
- this XYDataSeries
-
pointColor
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceXYDataSeries
- Parameters:
colors
- color palette indices. The color for data point i comes from index i. A value of 3 corresponds to the 3rd color from the color pallette.- Returns:
- this XYDataSeries
-
pointColor
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceXYDataSeries
- Parameters:
colors
- color palette indices. The color for data point i comes from index i. A value of 3 corresponds to the 3rd color from the color pallette.- Returns:
- this XYDataSeries
-
pointColor
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceXYDataSeries
- Parameters:
colors
- color names. The color for data point i comes from index i.- Returns:
- this XYDataSeries
-
pointColor
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceXYDataSeries
- Parameters:
t
- table containing colorscolumnName
- column int
containing colors. The color data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointColor
Description copied from interface:XYDataSeries
Sets the point color. Unspecified points use the default color.- Specified by:
pointColor
in interfaceXYDataSeries
- Parameters:
sds
- selectable data set (e.g. OneClick filterable table) containing colorscolumnName
- column insds
containing colors. The color data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointColorByY
Description copied from interface:DataSeries
Sets the point color for a data point based upon the y-value.- Specified by:
pointColorByY
in interfaceDataSeries
- Parameters:
colors
- function from the y-value of data points toPaint
- Returns:
- this DataSeries
-
pointColorByY
Description copied from interface:DataSeries
Sets the point color for a data point based upon the y-value.- Specified by:
pointColorByY
in interfaceDataSeries
- Parameters:
colors
- function from the y-value of data points toPaint
- Returns:
- this DataSeries
-
pointLabel
Description copied from interface:DataSeries
Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.- Specified by:
pointLabel
in interfaceDataSeries
- Parameters:
label
- label- Returns:
- this XYDataSeries
-
pointLabel
Description copied from interface:XYDataSeries
Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.- Specified by:
pointLabel
in interfaceXYDataSeries
- Parameters:
labels
- labels- Returns:
- this XYDataSeries
-
pointLabel
Description copied from interface:XYDataSeries
Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.- Specified by:
pointLabel
in interfaceXYDataSeries
- Parameters:
labels
- labels- Returns:
- this XYDataSeries
-
pointLabel
Description copied from interface:XYDataSeries
Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.- Specified by:
pointLabel
in interfaceXYDataSeries
- Parameters:
t
- table containing labelscolumnName
- column int
containing labels. The label data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointLabel
Description copied from interface:XYDataSeries
Sets the point label for data point i from index i of the input labels. Points outside of these indices are unlabeled.- Specified by:
pointLabel
in interfaceXYDataSeries
- Parameters:
sds
- selectable data set (e.g. OneClick filterable table) containing labelscolumnName
- column insds
containing labels. The color data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointShape
Description copied from interface:DataSeries
Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.- Specified by:
pointShape
in interfaceDataSeries
- Parameters:
shape
- shape- Returns:
- this DataSeries
-
pointShape
Description copied from interface:DataSeries
Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.- Specified by:
pointShape
in interfaceDataSeries
- Parameters:
shape
- shape- Returns:
- this DataSeries
-
pointShape
Description copied from interface:XYDataSeries
Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.- Specified by:
pointShape
in interfaceXYDataSeries
- Parameters:
shapes
- shapes- Returns:
- this XYDataSeries
-
pointShape
Description copied from interface:XYDataSeries
Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.- Specified by:
pointShape
in interfaceXYDataSeries
- Parameters:
shapes
- shapes- Returns:
- this XYDataSeries
-
pointShape
Description copied from interface:XYDataSeries
Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.- Specified by:
pointShape
in interfaceXYDataSeries
- Parameters:
shapes
- shapes- Returns:
- this XYDataSeries
-
pointShape
Description copied from interface:XYDataSeries
Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.- Specified by:
pointShape
in interfaceXYDataSeries
- Parameters:
t
- table containing shapescolumnName
- column int
containing shapes. The shape data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointShape
Description copied from interface:XYDataSeries
Sets the point shapes for data point i from index i of the input labels. Points outside of these indices use default shapes.- Specified by:
pointShape
in interfaceXYDataSeries
- Parameters:
sds
- selectable data set (e.g. OneClick filterable table) containing shapescolumnName
- column insds
containing shapes. The color data for point i comes from row i.- Returns:
- this XYDataSeries
-
pointLabelFormat
Description copied from interface:DataSeries
Sets the point label format.Use {0} where the data series name should be inserted, {1} for the x-value and {2} y-value e.g. "{0}: ({1}, {2})" will display as Series1: (2.0, 5.5).
- Specified by:
pointLabelFormat
in interfaceDataSeries
- Parameters:
format
- format- Returns:
- this data series.
-
xToolTipPattern
Description copied from interface:DataSeries
Sets the x-value tooltip format.- Specified by:
xToolTipPattern
in interfaceDataSeries
- Parameters:
format
- format- Returns:
- this data series.
-
yToolTipPattern
Description copied from interface:DataSeries
Sets the y-value tooltip format.- Specified by:
yToolTipPattern
in interfaceDataSeries
- Parameters:
format
- format- Returns:
- this data series.
-
toolTipPattern
Description copied from interface:DataSeries
Sets the tooltip format.- Specified by:
toolTipPattern
in interfaceDataSeries
- Parameters:
format
- format- Returns:
- this data series.
-
onClose
public void onClose()Description copied from interface:SeriesInternal
Series shut down after the plot is closed.- Specified by:
onClose
in interfaceSeriesInternal
-