Package org.pepstock.charba.client.data
Class TimeSeriesLineDataset
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.data.Dataset
-
- org.pepstock.charba.client.data.LiningDataset
-
- org.pepstock.charba.client.data.LineDataset
-
- org.pepstock.charba.client.data.TimeSeriesLineDataset
-
- All Implemented Interfaces:
HasCallbackScope
,HasDataPoints
,HasDataset
,HasPointFillStrokeStyles
,HasTimeSeriesItems
,IsDefaultAnimationContainer
,IsDefaultAnimationTransition
,IsDefaultFillHandler
,HasAnimationOptions
,HasFill
,HasSpanGaps
public class TimeSeriesLineDataset extends LineDataset implements HasTimeSeriesItems
The time series line chart allows a number of properties to be specified for each dataset. These are used to set display properties for a specific dataset.
In time series charts, the data string and data (as double) are not allowed. You must useDataPoint
orTimeSeriesItem
.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.Dataset
Dataset.CanvasObjectProperty, Dataset.CommonProperty
-
-
Field Summary
-
Fields inherited from class org.pepstock.charba.client.data.Dataset
DEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
-
-
Constructor Summary
Constructors Modifier Constructor Description TimeSeriesLineDataset()
Creates a dataset.
It uses the global options has default.TimeSeriesLineDataset(boolean hidden)
Creates a dataset.
It uses the global options has default.TimeSeriesLineDataset(IsDefaultOptions defaultValues)
Creates the dataset using a default.TimeSeriesLineDataset(IsDefaultOptions defaultValues, boolean hidden)
Creates the dataset using a default.protected
TimeSeriesLineDataset(Type type, boolean hidden)
Creates the dataset using a default and chart type related to the dataset.protected
TimeSeriesLineDataset(Type type, IsDefaultOptions defaultValues, boolean hidden)
Creates the dataset using a default and chart type related to the dataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description List<String>
getDataString()
Returns the data property of a dataset for a chart is specified as an array of strings.List<String>
getDataString(boolean binding)
Returns the data property of a dataset for a chart is specified as an array of strings.default int
getOrder()
Returns the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.default List<PointStyle>
getPointStyle()
Returns the style of the point.default List<Canvas>
getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.default List<Img>
getPointStyleAsImages()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.default PointStyleCallback<DatasetContext>
getPointStyleCallback()
Returns the point style callback, if set, otherwisenull
.default PointStyleType
getPointStyleType()
Returns the type of point style.void
setDataString(String... data)
Sets the data property of a dataset for a chart is specified as an array of strings.void
setDataString(List<String> data)
Sets the data property of a dataset for a chart is specified as an array of strings.default void
setOrder(int order)
Sets the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.default void
setPointStyle(PointStyleCallback<DatasetContext> pointStyleCallback)
Sets the point style callback.default void
setPointStyle(Canvas... pointStyle)
Sets the style of the point as canvas.default void
setPointStyle(Img... pointStyle)
Sets the style of the point as image.default void
setPointStyle(PointStyle... pointStyle)
Sets the style of the point.-
Methods inherited from class org.pepstock.charba.client.data.LineDataset
getCubicInterpolationMode, getCubicInterpolationModeCallback, getIndexAxis, getStepped, getSteppedCallback, getXAxisID, getYAxisID, isShowLine, setCubicInterpolationMode, setCubicInterpolationMode, setCubicInterpolationMode, setIndexAxis, setShowLine, setStepped, setStepped, setStepped, setStepped, setXAxisID, setXAxisID, setYAxisID, setYAxisID
-
Methods inherited from class org.pepstock.charba.client.data.LiningDataset
getBackgroundColor, getBackgroundColorAsGradient, getBackgroundColorAsPattern, getBackgroundColorAsString, getBorderCapStyle, getBorderCapStyleCallback, getBorderColor, getBorderColorAsGradient, getBorderColorAsString, getBorderDash, getBorderDashCallback, getBorderDashOffset, getBorderDashOffsetCallback, getBorderJoinStyle, getBorderJoinStyleCallback, getBorderWidth, getBorderWidthCallback, getDefaultBackgroundColorAsString, getDefaultBorderColorAsString, getDefaultBorderWidth, getDefaultHoverBackgroundColorAsString, getDefaultHoverBorderColorAsString, getDefaultHoverBorderWidth, getDrawActiveElementsOnTopCallback, getFill, getFillCallback, getFillHandler, getHoverBackgroundColor, getHoverBackgroundColorAsGradient, getHoverBackgroundColorAsPatterns, getHoverBackgroundColorAsString, getHoverBorderCapStyle, getHoverBorderCapStyleCallback, getHoverBorderColor, getHoverBorderColorAsGradient, getHoverBorderColorAsString, getHoverBorderDash, getHoverBorderDashCallback, getHoverBorderDashOffset, getHoverBorderDashOffsetCallback, getHoverBorderJoinStyle, getHoverBorderJoinStyleCallback, getHoverBorderWidth, getHoverBorderWidthCallback, getLabel, getOrderHandler, getPointBackgroundColor, getPointBackgroundColorAsGradient, getPointBackgroundColorAsString, getPointBackgroundColorCallback, getPointBorderColor, getPointBorderColorAsGradient, getPointBorderColorAsString, getPointBorderColorCallback, getPointBorderWidth, getPointBorderWidthCallback, getPointFillStyleProperty, getPointHitRadius, getPointHitRadiusCallback, getPointHoverBackgroundColor, getPointHoverBackgroundColorAsGradient, getPointHoverBackgroundColorAsString, getPointHoverBackgroundColorCallback, getPointHoverBorderColor, getPointHoverBorderColorAsGradient, getPointHoverBorderColorAsString, getPointHoverBorderColorCallback, getPointHoverBorderWidth, getPointHoverBorderWidthCallback, getPointHoverRadius, getPointHoverRadiusCallback, getPointRadius, getPointRadiusCallback, getPointRotation, getPointRotationCallback, getPointStrokeStyleProperty, getPointStyleHandler, getSpanGapHandler, getTension, isDrawActiveElementsOnTop, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderCapStyle, setBorderCapStyle, setBorderCapStyle, setBorderColor, setBorderColor, setBorderColor, setBorderDash, setBorderDash, setBorderDash, setBorderDashOffset, setBorderDashOffset, setBorderDashOffset, setBorderJoinStyle, setBorderJoinStyle, setBorderJoinStyle, setBorderWidth, setBorderWidth, setBorderWidth, setDrawActiveElementsOnTop, setDrawActiveElementsOnTop, setDrawActiveElementsOnTop, setFill, setFill, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderCapStyle, setHoverBorderCapStyle, setHoverBorderCapStyle, setHoverBorderColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderDash, setHoverBorderDash, setHoverBorderDash, setHoverBorderDashOffset, setHoverBorderDashOffset, setHoverBorderDashOffset, setHoverBorderJoinStyle, setHoverBorderJoinStyle, setHoverBorderJoinStyle, setHoverBorderWidth, setHoverBorderWidth, setHoverBorderWidth, setPointBackgroundColor, setPointBackgroundColor, setPointBackgroundColor, setPointBackgroundColor, setPointBackgroundColor, setPointBorderColor, setPointBorderColor, setPointBorderColor, setPointBorderColor, setPointBorderColor, setPointBorderWidth, setPointBorderWidth, setPointBorderWidth, setPointHitRadius, setPointHitRadius, setPointHitRadius, setPointHoverBackgroundColor, setPointHoverBackgroundColor, setPointHoverBackgroundColor, setPointHoverBackgroundColor, setPointHoverBackgroundColor, setPointHoverBorderColor, setPointHoverBorderColor, setPointHoverBorderColor, setPointHoverBorderColor, setPointHoverBorderColor, setPointHoverBorderWidth, setPointHoverBorderWidth, setPointHoverBorderWidth, setPointHoverRadius, setPointHoverRadius, setPointHoverRadius, setPointRadius, setPointRadius, setPointRadius, setPointRotation, setPointRotation, setPointRotation, setTension
-
Methods inherited from class org.pepstock.charba.client.data.Dataset
createContext, getAnimationContainer, getBackgroundColorCallback, getBorderColorCallback, getClip, getClipAsObject, getData, getData, getDataCount, getDataset, getDataType, getDefaultValues, getHoverBackgroundColorCallback, getHoverBorderColorCallback, getId, getOptions, getOptions, getScope, getType, getTypedDataset, hasOptions, invokeColorCallback, isClip, isHidden, isNormalized, isParsing, removeOptions, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setClip, setClip, setClip, setData, setData, setHidden, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setLabel, setNormalized, setOptions, setOptions, setParsing
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.options.HasAnimationOptions
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
-
Methods inherited from interface org.pepstock.charba.client.data.HasDataPoints
getDataPoints, getDataPoints
-
Methods inherited from interface org.pepstock.charba.client.data.HasDataset
getDataset
-
Methods inherited from interface org.pepstock.charba.client.options.HasFill
setFill, setFill, setFill, setFill
-
Methods inherited from interface org.pepstock.charba.client.options.HasSpanGaps
getSpanGaps, isSpanGaps, setSpanGaps, setSpanGaps
-
Methods inherited from interface org.pepstock.charba.client.data.HasTimeSeriesItems
getData, getData, getTimeSeriesData, getTimeSeriesData, setData, setData, setDataPoints, setDataPoints, setTimeSeriesData, setTimeSeriesData
-
-
-
-
Constructor Detail
-
TimeSeriesLineDataset
public TimeSeriesLineDataset()
Creates a dataset.
It uses the global options has default.
-
TimeSeriesLineDataset
public TimeSeriesLineDataset(boolean hidden)
Creates a dataset.
It uses the global options has default.- Parameters:
hidden
- iftrue
, it will be initially hidden.
-
TimeSeriesLineDataset
public TimeSeriesLineDataset(IsDefaultOptions defaultValues)
Creates the dataset using a default.- Parameters:
defaultValues
- default options
-
TimeSeriesLineDataset
public TimeSeriesLineDataset(IsDefaultOptions defaultValues, boolean hidden)
Creates the dataset using a default.- Parameters:
defaultValues
- default optionshidden
- iftrue
, it will be initially hidden.
-
TimeSeriesLineDataset
protected TimeSeriesLineDataset(Type type, boolean hidden)
Creates the dataset using a default and chart type related to the dataset.- Parameters:
type
- chart type related to the datasethidden
- iftrue
, it will be initially hidden.
-
TimeSeriesLineDataset
protected TimeSeriesLineDataset(Type type, IsDefaultOptions defaultValues, boolean hidden)
Creates the dataset using a default and chart type related to the dataset.- Parameters:
type
- chart type related to the datasetdefaultValues
- default optionshidden
- iftrue
, it will be initially hidden.
-
-
Method Detail
-
setDataString
public final void setDataString(String... data)
Description copied from class:LineDataset
Sets the data property of a dataset for a chart is specified as an array of strings. Each point in the data array corresponds to the label at the same index on the x axis.- Overrides:
setDataString
in classLineDataset
- Parameters:
data
- an array of strings
-
setDataString
public final void setDataString(List<String> data)
Description copied from class:LineDataset
Sets the data property of a dataset for a chart is specified as an array of strings. Each point in the data array corresponds to the label at the same index on the x axis.- Overrides:
setDataString
in classLineDataset
- Parameters:
data
- a list of strings
-
getDataString
public final List<String> getDataString()
Description copied from class:LineDataset
Returns the data property of a dataset for a chart is specified as an array of strings. Each point in the data array corresponds to the label at the same index on the x axis.- Overrides:
getDataString
in classLineDataset
- Returns:
- a list of strings or an empty list of strings if the data type is not
DataType.STRINGS
.
-
getDataString
public final List<String> getDataString(boolean binding)
Description copied from class:LineDataset
Returns the data property of a dataset for a chart is specified as an array of strings. Each point in the data array corresponds to the label at the same index on the x axis.- Overrides:
getDataString
in classLineDataset
- Parameters:
binding
- iftrue
binds the new array list in the container- Returns:
- a list of strings or an empty list of strings if the data type is not
DataType.STRINGS
.
-
setOrder
public default void setOrder(int order)
Sets the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.- Parameters:
order
- the drawing order of dataset.
-
getOrder
public default int getOrder()
Returns the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.- Returns:
- the drawing order of dataset
-
setPointStyle
public default void setPointStyle(PointStyle... pointStyle)
Sets the style of the point.- Parameters:
pointStyle
- array of the style of the point.
-
getPointStyle
public default List<PointStyle> getPointStyle()
Returns the style of the point.- Returns:
- the style of the point or
null
if point style is set as image
-
setPointStyle
public default void setPointStyle(Img... pointStyle)
Sets the style of the point as image.- Parameters:
pointStyle
- image element of the style of the point as image.
-
getPointStyleType
public default PointStyleType getPointStyleType()
Returns the type of point style.- Returns:
- the type of point style
-
getPointStyleAsImages
public default List<Img> getPointStyleAsImages()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.- Returns:
- image of the style of the point as image.
If property is missing or not a image, returnsnull
.
-
setPointStyle
public default void setPointStyle(Canvas... pointStyle)
Sets the style of the point as canvas.- Parameters:
pointStyle
- canvas element of the style of the point as canvas.
-
getPointStyleAsCanvas
public default List<Canvas> getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.- Returns:
- image of the style of the point as canvas.
If property is missing or not a canvas, returnsnull
.
-
getPointStyleCallback
public default PointStyleCallback<DatasetContext> getPointStyleCallback()
Returns the point style callback, if set, otherwisenull
.- Returns:
- the point style callback, if set, otherwise
null
.
-
setPointStyle
public default void setPointStyle(PointStyleCallback<DatasetContext> pointStyleCallback)
Sets the point style callback.- Parameters:
pointStyleCallback
- the point style callback.
-
-