Package org.pepstock.charba.client.data
Class FloatingData
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeArrayContainer<ArrayDouble>
-
- org.pepstock.charba.client.commons.NativeArrayDoubleContainer
-
- org.pepstock.charba.client.data.FloatingData
-
public final class FloatingData extends NativeArrayDoubleContainer
Specifies the dataset for a bar chart as a pair of two numbers.
This will force rendering of bars with gaps between them (floating-bars).
First and second numbers will correspond the start and the end points of a bar respectively.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description FloatingData()
Creates the object setting the default start and end points of a bar.FloatingData(double start, double end)
Creates the object setting the start and end points of a bar.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAbsValue()
Returns the absolute value which is calculating subtracting the start point from end point.double
getEnd()
Returns the end point of a bar.double
getStart()
Returns the start point of a bar.double
getValue()
Returns the value which is calculating subtracting the start point from end point.void
setValues(double start, double end)
Sets the start and end points of a bar.String
toString()
-
Methods inherited from class org.pepstock.charba.client.commons.NativeArrayDoubleContainer
clear, push
-
Methods inherited from class org.pepstock.charba.client.commons.NativeArrayContainer
getNativeArray, toJSON
-
-
-
-
Constructor Detail
-
FloatingData
public FloatingData()
Creates the object setting the default start and end points of a bar.
-
FloatingData
public FloatingData(double start, double end)
Creates the object setting the start and end points of a bar.- Parameters:
start
- the start point of a barend
- the end point of a bar
-
-
Method Detail
-
getStart
public double getStart()
Returns the start point of a bar.- Returns:
- the start point of a bar
-
getEnd
public double getEnd()
Returns the end point of a bar.- Returns:
- the end point of a bar
-
setValues
public void setValues(double start, double end)
Sets the start and end points of a bar.- Parameters:
start
- the start point of a barend
- the end point of a bar
-
getValue
public double getValue()
Returns the value which is calculating subtracting the start point from end point.- Returns:
- the value which is calculating subtracting the start point from end point
-
getAbsValue
public double getAbsValue()
Returns the absolute value which is calculating subtracting the start point from end point.- Returns:
- the absolute value which is calculating subtracting the start point from end point
-
-