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:
-
Field Summary
Fields inherited from class com.illumon.iris.db.plot.AbstractSeriesInternal
dataChangeListener -
Constructor Summary
ConstructorsConstructorDescriptionXYDataSeriesFunctionImpl(AxesImpl axes, int id, Comparable name, DoubleUnaryOperator function) Creates a XYDataSeriesFunction instance. -
Method Summary
Modifier and TypeMethodDescriptionCreate a copy of the series on a different set of axes.Returns a snapshot of this dataset which will not update.funcNPoints(int npoints) Sets the number of data points in this dataset.funcNPointsInternal(int npoints) Sets the number of data points in this dataset if the user did not set funcNPoints.funcRange(double xmin, double xmax) Sets the data range for this series.funcRange(double xmin, double xmax, int npoints) Sets the data range for this series.funcRangeInternal(double xmin, double xmax) Sets the data range for this series if the user did not set funcRange.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.doublegetX(int i) Gets the x value of the data point at indexi.org.jfree.data.RangeGets the x range of this dataset.doublegetY(int i) Gets the y value of the data point at indexi.org.jfree.data.RangeGets the y range of this dataset.voidinvokeRecompute(QueryProcessorConnection qpc, double xmin, double xmax, String name, int sessionId) Invokes a remote query to the server-side copy in client-server context, otherwise funcRangeInternalintsize()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, yToolTipPatternMethods 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, setYToolTipPatternMethods inherited from class com.illumon.iris.db.plot.AbstractSeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, axes, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, id, name, removeTableHandleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, yToolTipPatternMethods inherited from interface com.illumon.iris.db.plot.datasets.DataSeriesInternal
axes, chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPlotInfo, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, id, nameMethods inherited from interface com.illumon.iris.db.plot.SeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, onInflate, removeTableHandleMethods 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, pointSizeMethods 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:SeriesInternalCreate a copy of the series on a different set of axes.- Specified by:
copyin interfaceDataSeriesInternal- Specified by:
copyin interfaceSeriesInternal- Specified by:
copyin interfaceXYDataSeriesInternal- Parameters:
axes- new axes.- Returns:
- copy of the series on a different set of axes.
-
size
public int size()Description copied from interface:DataSeriesInternalGets the size of this data set.- Specified by:
sizein interfaceDataSeriesInternal- Returns:
- size of this data set
-
createSnapshot
Description copied from interface:DataSeriesInternalReturns a snapshot of this dataset which will not update.- Specified by:
createSnapshotin interfaceDataSeriesInternal- Specified by:
createSnapshotin interfaceXYDataSeriesInternal
-
getX
public double getX(int i) Description copied from interface:XYDataSeriesInternalGets the x value of the data point at indexi.- Specified by:
getXin interfaceXYDataSeriesInternal- Parameters:
i- index- Returns:
- x value of this data point at index
i
-
getY
public double getY(int i) Description copied from interface:XYDataSeriesInternalGets the y value of the data point at indexi.- Specified by:
getYin 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:XYDataSeriesInternalGets the x range of this dataset. Should never return null.- Specified by:
getXRangein interfaceXYDataSeriesInternal- Returns:
- x range of this dataset
-
getYRange
public org.jfree.data.Range getYRange()Description copied from interface:XYDataSeriesInternalGets the y range of this dataset. Should never return null.- Specified by:
getYRangein interfaceXYDataSeriesInternal- Returns:
- y range of this dataset
-
funcRange
Sets the data range for this series.- Specified by:
funcRangein 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:
funcRangein interfaceXYDataSeriesFunction- Parameters:
xmin- range minimumxmax- range maximumnpoints- number of data points- Returns:
- this data series with the new range
- Throws:
IllegalArgumentException-xminmust not be less thanxmaxxminandxmaxmust be normal. SeeDoubleFpPrimitives.isNormal(double)npointsmust non-negative
-
funcNPoints
Sets the number of data points in this dataset.- Specified by:
funcNPointsin interfaceXYDataSeriesFunction- Parameters:
npoints- number of points- Returns:
- this data series with the specified number of points.
- Throws:
IllegalArgumentException-npointsmust 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:XYDataSeriesFunctionInternalSets the data range for this series if the user did not set funcRange.- Specified by:
funcRangeInternalin interfaceXYDataSeriesFunctionInternal- Parameters:
xmin- range minimumxmax- range maximum- Returns:
- this data series with the new range
-
funcRangeInternal
Description copied from interface:XYDataSeriesFunctionInternalSets the data range and number of points for this series if the user did not set funcRange.- Specified by:
funcRangeInternalin interfaceXYDataSeriesFunctionInternal- Parameters:
xmin- range minimumxmax- range maximumnpoints- number of data points- Returns:
- this data series with the new range
-
funcNPointsInternal
Description copied from interface:XYDataSeriesFunctionInternalSets the number of data points in this dataset if the user did not set funcNPoints.- Specified by:
funcNPointsInternalin interfaceXYDataSeriesFunctionInternal- Parameters:
npoints- number of points- Returns:
- this data series with the specified number of points.
-