Package org.pepstock.charba.client.data
Class DataPoint
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.data.AbstractDataPoint
-
- org.pepstock.charba.client.data.AbstractXYDataPoint
-
- org.pepstock.charba.client.data.DataPoint
-
public final class DataPoint extends AbstractXYDataPoint
Used for sparse datasets, such as those in scatter charts. Each data point is specified using an object containing x and y properties.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.AbstractXYDataPoint
AbstractXYDataPoint.XYProperty
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.AbstractDataPoint
AbstractDataPoint.CharbaProperty
-
-
Constructor Summary
Constructors Constructor Description DataPoint()
Creates the object with an empty native object.DataPoint(double x, double y)
Creates the object with the passed point values.DataPoint(double x, double y, double r)
Creates the object with the passed point values (for bubble).DataPoint(double x, FloatingData y)
Creates the object with the passed point values.DataPoint(String x, double y)
Creates the object with the passed point values.DataPoint(String x, FloatingData y)
Creates the object with the passed point values.DataPoint(Date x, double y)
Creates the object with the passed point values.DataPoint(Date x, FloatingData y)
Creates the object with the passed point values.DataPoint(ItemsEnvelop<NativeObject> envelop)
Creates the object with a native object passed as argument by andBaseEnvelop
.
This is called by theDataItem
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getR()
Returns the bubble radius in pixels (not scaled).FloatingData
getYAsFloatingData()
Returns Y value.void
setR(double r)
Sets the bubble radius in pixels (not scaled).
It is not scaled by the chart, it is the raw radius in pixels of the bubble that is drawn on the canvas.void
setY(FloatingData y)
Sets Y value.String
toString()
-
Methods inherited from class org.pepstock.charba.client.data.AbstractXYDataPoint
getX, getXAsDate, getXAsString, getXType, getY, getYType, setX, setX, setX, setY
-
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
-
DataPoint
public DataPoint()
Creates the object with an empty native object.
-
DataPoint
public DataPoint(double x, double y)
Creates the object with the passed point values.- Parameters:
x
- x value of data pointy
- y value of data point
-
DataPoint
public DataPoint(Date x, double y)
Creates the object with the passed point values.- Parameters:
x
- x value of data pointy
- y value of data point
-
DataPoint
public DataPoint(String x, double y)
Creates the object with the passed point values.- Parameters:
x
- x value of data pointy
- y value of data point
-
DataPoint
public DataPoint(double x, FloatingData y)
Creates the object with the passed point values.- Parameters:
x
- x value of data pointy
- y value of data point
-
DataPoint
public DataPoint(Date x, FloatingData y)
Creates the object with the passed point values.- Parameters:
x
- x value of data pointy
- y value of data point
-
DataPoint
public DataPoint(String x, FloatingData y)
Creates the object with the passed point values.- Parameters:
x
- x value of data pointy
- y value of data point
-
DataPoint
public DataPoint(double x, double y, double r)
Creates the object with the passed point values (for bubble).- Parameters:
x
- x value of data pointy
- y value of data pointr
- the bubble radius in pixels (not scaled).
-
DataPoint
public DataPoint(ItemsEnvelop<NativeObject> envelop)
Creates the object with a native object passed as argument by andBaseEnvelop
.
This is called by theDataItem
.- Parameters:
envelop
- envelop which contains a native object with a data point
-
-
Method Detail
-
setY
public void setY(FloatingData y)
Sets Y value.- Parameters:
y
- Y value.
-
getYAsFloatingData
public FloatingData getYAsFloatingData()
Returns Y value.- Returns:
- Y value.
-
setR
public void setR(double r)
Sets the bubble radius in pixels (not scaled).
It is not scaled by the chart, it is the raw radius in pixels of the bubble that is drawn on the canvas.- Parameters:
r
- the bubble radius in pixels (not scaled).
-
getR
public double getR()
Returns the bubble radius in pixels (not scaled).- Returns:
- the bubble radius in pixels (not scaled).
-
-