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 protectedDatasetElement(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 doublegetAngle()Returns the angle of data set item.doublegetBase()Returns the base value of data set.doublegetCircumference()Returns the circumference of data set item.doublegetControlPointNextX()Returns the next X control point of data set item in pixel.doublegetControlPointNextY()Returns the next Y control point of data set item in pixel.doublegetControlPointPreviousX()Returns the previous X control point of data set item in pixel.doublegetControlPointPreviousY()Returns the previous Y control point of data set item in pixel.doublegetEndAngle()Returns the end angle of data set item.doublegetHeight()Returns the height of data set item in pixel.doublegetInnerRadius()Returns the inner radius of data set item in pixel.DatasetElementOptionsgetOptions()Returns the data set item options.doublegetOuterRadius()Returns the outer radius of data set item in pixel.ParsedgetParsed()Returns the parsed values.doublegetStartAngle()Returns the start angle of data set item.doublegetWidth()Returns the width of data set item in pixel.booleanisActive()Returns if element is active.booleanisHorizontal()Returns if is an horizontal view.booleanisSkipped()Returnstrueif skipped.booleanisStop()Returnstrueif 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:
trueif is an horizontal view.
-
isActive
public final boolean isActive()
Returns if element is active.- Returns:
trueif 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()
Returnstrueif skipped.- Returns:
trueif skipped.
-
isStop
public final boolean isStop()
Returnstrueif stopped.- Returns:
trueif 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.
-
-