Class XYDataSeriesFunctionImpl
java.lang.Object
com.illumon.iris.db.plot.AbstractSeriesInternal
com.illumon.iris.db.plot.datasets.AbstractDataSeries
com.illumon.iris.db.plot.datasets.xy.AbstractXYDataSeries
com.illumon.iris.db.plot.datasets.xy.XYDataSeriesFunctionImpl
- All Implemented Interfaces:
DataSeries
,DataSeriesInternal
,ValidatingDataSeries
,XYDataSeries
,XYDataSeriesFunction
,XYDataSeriesFunctionInternal
,XYDataSeriesInternal
,PlotExceptionCause
,Series
,SeriesInternal
,Serializable
public class XYDataSeriesFunctionImpl extends AbstractXYDataSeries implements XYDataSeriesFunctionInternal
XYDataSeriesInternal
based on a function.
By default, this calculates at least 200 data points inside the plots existing range.
The number of points can be increased for a finer grained plot, or decreased if less resolution is needed.
The points are recomputed as the Chart
's x-range changes.- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description XYDataSeriesFunctionImpl(AxesImpl axes, int id, Comparable name, DoubleUnaryOperator function)
Creates a XYDataSeriesFunction instance. -
Method Summary
Modifier and Type Method Description XYDataSeriesFunctionImpl
copy(AxesImpl axes)
Create a copy of the series on a different set of axes.XYDataSeriesFunctionImpl
createSnapshot()
Returns a snapshot of this dataset which will not update.XYDataSeriesFunctionImpl
funcNPoints(int npoints)
Sets the number of data points in this dataset.XYDataSeriesFunctionImpl
funcNPointsInternal(int npoints)
Sets the number of data points in this dataset if the user did not set funcNPoints.XYDataSeriesFunctionImpl
funcRange(double xmin, double xmax)
Sets the data range for this series.XYDataSeriesFunctionImpl
funcRange(double xmin, double xmax, int npoints)
Sets the data range for this series.XYDataSeriesFunctionImpl
funcRangeInternal(double xmin, double xmax)
Sets the data range for this series if the user did not set funcRange.XYDataSeriesFunctionImpl
funcRangeInternal(double xmin, double xmax, int npoints)
Sets the data range and number of points for this series if the user did not set funcRange.double
getX(int i)
Gets the x value of the data point at indexi
.org.jfree.data.Range
getXRange()
Gets the x range of this dataset.double
getY(int i)
Gets the y value of the data point at indexi
.org.jfree.data.Range
getYRange()
Gets the y range of this dataset.void
invokeRecompute(QueryProcessorConnection qpc, double xmin, double xmax, String name, int sessionId)
Invokes a remote query to the server-side copy in client-server context, otherwise funcRangeInternalint
size()
Gets the size of this data set.Methods inherited from class com.illumon.iris.db.plot.datasets.xy.AbstractXYDataSeries
colorsSetSpecific, errorBarColor, errorBarColor, errorBarColor, getPointColor, getPointLabel, getPointShape, getPointSize, getSeriesColor, gradientVisible, lineColor, lineColor, lineColor, lineStyle, linesVisible, onClose, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorByY, pointColorByY, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointLabel, pointLabelFormat, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, snapshotModifiers, toolTipPattern, validate, xToolTipPattern, yToolTipPattern
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.DataSeries
errorBarColor, errorBarColor, errorBarColor, gradientVisible, lineColor, lineColor, lineColor, lineStyle, linesVisible, pointColor, pointColor, pointColor, pointColorByY, pointColorByY, pointLabel, pointLabelFormat, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, toolTipPattern, xToolTipPattern, yToolTipPattern
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
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.XYDataSeries
pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize
Methods inherited from interface com.illumon.iris.db.plot.datasets.xy.XYDataSeriesInternal
drawXError, drawYError, getEndX, getEndY, getStartX, getStartY, sort
-
Constructor Details
-
XYDataSeriesFunctionImpl
public XYDataSeriesFunctionImpl(AxesImpl axes, int id, Comparable name, DoubleUnaryOperator function)Creates a XYDataSeriesFunction instance.- Parameters:
axes
- axes on which the function will be plottedid
- data series idname
- series namefunction
- function to plot
-
-
Method Details
-
copy
Description copied from interface:SeriesInternal
Create a copy of the series on a different set of axes.- Specified by:
copy
in interfaceDataSeriesInternal
- Specified by:
copy
in interfaceSeriesInternal
- Specified by:
copy
in interfaceXYDataSeriesInternal
- Parameters:
axes
- new axes.- Returns:
- copy of the series on a different set of axes.
-
size
public int size()Description copied from interface:DataSeriesInternal
Gets the size of this data set.- Specified by:
size
in interfaceDataSeriesInternal
- Returns:
- size of this data set
-
createSnapshot
Description copied from interface:DataSeriesInternal
Returns a snapshot of this dataset which will not update.- Specified by:
createSnapshot
in interfaceDataSeriesInternal
- Specified by:
createSnapshot
in interfaceXYDataSeriesInternal
-
getX
public double getX(int i)Description copied from interface:XYDataSeriesInternal
Gets the x value of the data point at indexi
.- Specified by:
getX
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- x value of this data point at index
i
-
getY
public double getY(int i)Description copied from interface:XYDataSeriesInternal
Gets the y value of the data point at indexi
.- Specified by:
getY
in interfaceXYDataSeriesInternal
- Parameters:
i
- index- Returns:
- x value of this data point at index
i
-
getXRange
public org.jfree.data.Range getXRange()Description copied from interface:XYDataSeriesInternal
Gets the x range of this dataset. Should never return null.- Specified by:
getXRange
in interfaceXYDataSeriesInternal
- Returns:
- x range of this dataset
-
getYRange
public org.jfree.data.Range getYRange()Description copied from interface:XYDataSeriesInternal
Gets the y range of this dataset. Should never return null.- Specified by:
getYRange
in interfaceXYDataSeriesInternal
- Returns:
- y range of this dataset
-
funcRange
Sets the data range for this series.- Specified by:
funcRange
in interfaceXYDataSeriesFunction
- Parameters:
xmin
- range minimumxmax
- range maximum- Returns:
- this data series with the new range
-
funcRange
Sets the data range for this series.- Specified by:
funcRange
in interfaceXYDataSeriesFunction
- Parameters:
xmin
- range minimumxmax
- range maximumnpoints
- number of data points- Returns:
- this data series with the new range
- Throws:
IllegalArgumentException
-xmin
must not be less thanxmax
xmin
andxmax
must be normal. SeeDoubleFpPrimitives.isNormal(double)
npoints
must non-negative
-
funcNPoints
Sets the number of data points in this dataset.- Specified by:
funcNPoints
in interfaceXYDataSeriesFunction
- Parameters:
npoints
- number of points- Returns:
- this data series with the specified number of points.
- Throws:
IllegalArgumentException
-npoints
must be non-negative.
-
invokeRecompute
public void invokeRecompute(QueryProcessorConnection qpc, double xmin, double xmax, String name, int sessionId)Invokes a remote query to the server-side copy in client-server context, otherwise funcRangeInternal -
funcRangeInternal
Description copied from interface:XYDataSeriesFunctionInternal
Sets the data range for this series if the user did not set funcRange.- Specified by:
funcRangeInternal
in interfaceXYDataSeriesFunctionInternal
- Parameters:
xmin
- range minimumxmax
- range maximum- Returns:
- this data series with the new range
-
funcRangeInternal
Description copied from interface:XYDataSeriesFunctionInternal
Sets the data range and number of points for this series if the user did not set funcRange.- Specified by:
funcRangeInternal
in interfaceXYDataSeriesFunctionInternal
- Parameters:
xmin
- range minimumxmax
- range maximumnpoints
- number of data points- Returns:
- this data series with the new range
-
funcNPointsInternal
Description copied from interface:XYDataSeriesFunctionInternal
Sets the number of data points in this dataset if the user did not set funcNPoints.- Specified by:
funcNPointsInternal
in interfaceXYDataSeriesFunctionInternal
- Parameters:
npoints
- number of points- Returns:
- this data series with the specified number of points.
-