Package org.pepstock.charba.client.items
Class DatasetElement
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractReadOnlyPoint
-
- org.pepstock.charba.client.items.DatasetElement
-
- All Implemented Interfaces:
IsPoint
public class DatasetElement extends AbstractReadOnlyPoint
Calling some methods on your chart instance passing an argument of an event, will return the elements at the event position.
The elements are mapped by this object.
This is the CHART.JS item with all needed info about a selected data set.
This object has been created and passed to event handler or callbacks to apply own logic.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DatasetElement(CallbacksEnvelop<NativeObject> envelop)
Creates the item using an envelop of the native java script object which contains all properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAngle()
Returns the angle of data set item.double
getBase()
Returns the base value of data set.double
getCircumference()
Returns the circumference of data set item.double
getControlPointNextX()
Returns the next X control point of data set item in pixel.double
getControlPointNextY()
Returns the next Y control point of data set item in pixel.double
getControlPointPreviousX()
Returns the previous X control point of data set item in pixel.double
getControlPointPreviousY()
Returns the previous Y control point of data set item in pixel.double
getEndAngle()
Returns the end angle of data set item.double
getHeight()
Returns the height of data set item in pixel.double
getInnerRadius()
Returns the inner radius of data set item in pixel.DatasetElementOptions
getOptions()
Returns the data set item options.double
getOuterRadius()
Returns the outer radius of data set item in pixel.Parsed
getParsed()
Returns the parsed values.double
getStartAngle()
Returns the start angle of data set item.double
getWidth()
Returns the width of data set item in pixel.boolean
isActive()
Returns if element is active.boolean
isHorizontal()
Returns if is an horizontal view.boolean
isSkipped()
Returnstrue
if skipped.boolean
isStop()
Returnstrue
if stopped.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractReadOnlyPoint
getX, getY, toString
-
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, 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, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.commons.IsPoint
isConsistent
-
-
-
-
Constructor Detail
-
DatasetElement
protected DatasetElement(CallbacksEnvelop<NativeObject> envelop)
Creates the item using an envelop of the native java script object which contains all properties.- Parameters:
envelop
- envelop of the nativeObject native java script object which contains all properties.
-
-
Method Detail
-
getOptions
public final DatasetElementOptions getOptions()
Returns the data set item options.- Returns:
- the data set item options.
-
getParsed
public final Parsed getParsed()
Returns the parsed values.- Returns:
- the parsed values.
-
isHorizontal
public final boolean isHorizontal()
Returns if is an horizontal view.- Returns:
true
if is an horizontal view.
-
isActive
public final boolean isActive()
Returns if element is active.- Returns:
true
if the element is active.
-
getBase
public final double getBase()
Returns the base value of data set.- Returns:
- the base value of data set.
-
getWidth
public final double getWidth()
Returns the width of data set item in pixel.- Returns:
- the width of data set item in pixel.
-
getHeight
public final double getHeight()
Returns the height of data set item in pixel.- Returns:
- the height of data set item in pixel.
-
isSkipped
public final boolean isSkipped()
Returnstrue
if skipped.- Returns:
true
if skipped.
-
isStop
public final boolean isStop()
Returnstrue
if stopped.- Returns:
true
if stopped.
-
getControlPointPreviousX
public final double getControlPointPreviousX()
Returns the previous X control point of data set item in pixel.- Returns:
- the previous X control point of data set item in pixel.
-
getControlPointPreviousY
public final double getControlPointPreviousY()
Returns the previous Y control point of data set item in pixel.- Returns:
- the previous Y control point of data set item in pixel.
-
getControlPointNextX
public final double getControlPointNextX()
Returns the next X control point of data set item in pixel.- Returns:
- the next X control point of data set item in pixel.
-
getControlPointNextY
public final double getControlPointNextY()
Returns the next Y control point of data set item in pixel.- Returns:
- the next Y control point of data set item in pixel.
-
getAngle
public final double getAngle()
Returns the angle of data set item.- Returns:
- the angle of data set item.
-
getStartAngle
public final double getStartAngle()
Returns the start angle of data set item.- Returns:
- the start angle of data set item.
-
getEndAngle
public double getEndAngle()
Returns the end angle of data set item.- Returns:
- the end angle of data set item.
-
getCircumference
public double getCircumference()
Returns the circumference of data set item.- Returns:
- the circumference of data set item.
-
getOuterRadius
public double getOuterRadius()
Returns the outer radius of data set item in pixel.- Returns:
- the outer radius of data set item in pixel.
-
getInnerRadius
public double getInnerRadius()
Returns the inner radius of data set item in pixel.- Returns:
- the inner radius of data set item in pixel.
-
-