Package org.pepstock.charba.client.data
Interface HasTimeSeriesItems
-
- All Superinterfaces:
HasDataPoints,HasDataset
- All Known Implementing Classes:
TimeSeriesBarDataset,TimeSeriesHorizontalBarDataset,TimeSeriesLineDataset
public interface HasTimeSeriesItems extends HasDataPoints
Interface to define if a dataset can contains time series items.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static voidcheckTimeSeriesItems(List<DataPoint> datapoints)Checks if the list of data points, passed as argument, have got the properties to be time series items (time and Y value).
If not, aIllegalArgumentExceptionwill be thrown.default List<Double>getData()Throws an exception because not available.default List<Double>getData(boolean binding)Throws an exception because not available.default List<TimeSeriesItem>getTimeSeriesData()Returns the data property of a dataset for a chart is specified as an array of time series items.default List<TimeSeriesItem>getTimeSeriesData(boolean binding)Returns the data property of a dataset for a chart is specified as an array of time series itemsstatic booleanisTimeSeriesItem(DataPoint datapoint)Returnstrueif the data point, passed as argument, has got the properties to be a time series item (time and Y value).default voidsetData(double... values)Throws an exception because not available.default voidsetData(List<Double> values)Throws an exception because not available.default voidsetDataPoints(List<DataPoint> datapoints)Sets the data property of a dataset for a chart is specified as an array of data points.default voidsetDataPoints(DataPoint... datapoints)Sets the data property of a dataset for a chart is specified as an array of data points.default voidsetTimeSeriesData(List<TimeSeriesItem> items)Sets the data property of a dataset for a chart is specified as an array of time series items.default voidsetTimeSeriesData(TimeSeriesItem... items)Sets the data property of a dataset for a chart is specified as an array of time series items.-
Methods inherited from interface org.pepstock.charba.client.data.HasDataPoints
getDataPoints, getDataPoints
-
Methods inherited from interface org.pepstock.charba.client.data.HasDataset
getDataset
-
-
-
-
Method Detail
-
isTimeSeriesItem
static boolean isTimeSeriesItem(DataPoint datapoint)
Returnstrueif the data point, passed as argument, has got the properties to be a time series item (time and Y value).- Parameters:
datapoint- data point instance to be checked- Returns:
trueif the data point, passed as argument, has got the properties to be a time series item (time and Y value)
-
checkTimeSeriesItems
static void checkTimeSeriesItems(List<DataPoint> datapoints)
Checks if the list of data points, passed as argument, have got the properties to be time series items (time and Y value).
If not, aIllegalArgumentExceptionwill be thrown.- Parameters:
datapoints- list of data points to be checked
-
setData
default void setData(double... values)
Throws an exception because not available.- Parameters:
values- ignored because will throw an exception
-
setData
default void setData(List<Double> values)
Throws an exception because not available.- Parameters:
values- ignored because will throw an exception
-
getData
default List<Double> getData()
Throws an exception because not available.- Returns:
- will throw an exception
-
getData
default List<Double> getData(boolean binding)
Throws an exception because not available.- Parameters:
binding- ignored because will throw an exception- Returns:
- will throw an exception
-
setDataPoints
default void setDataPoints(DataPoint... datapoints)
Sets the data property of a dataset for a chart is specified as an array of data points.- Specified by:
setDataPointsin interfaceHasDataPoints- Parameters:
datapoints- an array of data points
-
setDataPoints
default void setDataPoints(List<DataPoint> datapoints)
Sets the data property of a dataset for a chart is specified as an array of data points.- Specified by:
setDataPointsin interfaceHasDataPoints- Parameters:
datapoints- a list of data points
-
setTimeSeriesData
default void setTimeSeriesData(TimeSeriesItem... items)
Sets the data property of a dataset for a chart is specified as an array of time series items.- Parameters:
items- an array of time series items
-
setTimeSeriesData
default void setTimeSeriesData(List<TimeSeriesItem> items)
Sets the data property of a dataset for a chart is specified as an array of time series items.- Parameters:
items- a list of time series items
-
getTimeSeriesData
default List<TimeSeriesItem> getTimeSeriesData()
Returns the data property of a dataset for a chart is specified as an array of time series items.- Returns:
- a list of time series items or an empty list of time series items if the data type is not
DataType.POINTS.
-
getTimeSeriesData
default List<TimeSeriesItem> getTimeSeriesData(boolean binding)
Returns the data property of a dataset for a chart is specified as an array of time series items- Parameters:
binding- iftruebinds the new array list in the container- Returns:
- a list of time series items or an empty list of time series data if the data type is not
DataType.POINTS.
-
-