Package org.pepstock.charba.client.data
Class AbstractXYDataPoint
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.data.AbstractDataPoint
-
- org.pepstock.charba.client.data.AbstractXYDataPoint
-
- Direct Known Subclasses:
DataPoint
,MatrixDataPoint
public abstract class AbstractXYDataPoint extends AbstractDataPoint
Maps the common methods for a data point with X and Y properties.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractXYDataPoint.XYProperty
Name of properties of native object.
No private because it is used by time series item-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.AbstractDataPoint
AbstractDataPoint.CharbaProperty
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractXYDataPoint(NativeObject nativeObject)
Creates the object with a native object passed as argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getX()
Returns X value as double (for scatter and bubble datasets).Date
getXAsDate()
Returns X value as date for time series.String
getXAsString()
Returns X value as string.DataPointType
getXType()
Returns the object type of data stored as X.double
getY()
Returns Y value.DataPointType
getYType()
Returns the object type of data stored as Y.void
setX(double x)
Sets X value as double (for scatter and bubble datasets).void
setX(String x)
Sets X value as string.void
setX(Date x)
Sets X value as date for time series.void
setY(double y)
Sets Y value.-
Methods inherited from class org.pepstock.charba.client.data.AbstractDataPoint
checkAndSetType, getAttribute, getAttributeAsDate, getAttributeAsObject, getAttributeAsString, setAttribute, setAttribute, setAttribute, setAttribute
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
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
-
-
-
-
Constructor Detail
-
AbstractXYDataPoint
protected AbstractXYDataPoint(NativeObject nativeObject)
Creates the object with a native object passed as argument.- Parameters:
nativeObject
- native object which maps a data point
-
-
Method Detail
-
getXType
public final DataPointType getXType()
Returns the object type of data stored as X.- Returns:
- the object type of data stored as X
-
setX
public final void setX(double x)
Sets X value as double (for scatter and bubble datasets).- Parameters:
x
- X value as double
-
getX
public final double getX()
Returns X value as double (for scatter and bubble datasets).- Returns:
- X value as double
-
setX
public final void setX(Date x)
Sets X value as date for time series.- Parameters:
x
- X value as date for time series
-
getXAsDate
public final Date getXAsDate()
Returns X value as date for time series.- Returns:
- X value as date for time series or
null
if is not set
-
setX
public final void setX(String x)
Sets X value as string.- Parameters:
x
- X value as string
-
getXAsString
public final String getXAsString()
Returns X value as string.- Returns:
- X value as string or
Undefined.STRING
if is not set
-
getYType
public final DataPointType getYType()
Returns the object type of data stored as Y.- Returns:
- the object type of data stored as Y
-
setY
public final void setY(double y)
Sets Y value.- Parameters:
y
- Y value.
-
getY
public final double getY()
Returns Y value.- Returns:
- Y value.
-
-