Class Interaction
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<P,D>
-
- org.pepstock.charba.client.options.Interaction
-
- All Implemented Interfaces:
IsDefaultInteraction
- Direct Known Subclasses:
Hover
public class Interaction extends AbstractModel<P,D> implements IsDefaultInteraction
Definitions about how the user can interact with chart elements.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InteractionAxis
getAxis()
Returns which directions are used in calculating distances.InteractionMode
getMode()
Returns which elements appear in the interaction.boolean
isIncludeInvisible()
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.boolean
isIntersect()
iftrue
, the mode only applies when the mouse position intersects an item on the chart.void
setAxis(InteractionAxis axis)
Sets which directions are used in calculating distances.void
setIncludeInvisible(boolean includeInvisible)
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.void
setIntersect(boolean intersect)
iftrue
, the only applies when the mouse position intersects an item on the chart.void
setMode(InteractionMode mode)
Sets which elements appear in the interaction.-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultInteraction
create, getMode, isIntersect
-
-
-
-
Method Detail
-
setAxis
public final void setAxis(InteractionAxis axis)
Sets which directions are used in calculating distances.- Parameters:
axis
- define which directions are used in calculating distances.
-
getAxis
public final InteractionAxis getAxis()
Returns which directions are used in calculating distances.- Specified by:
getAxis
in interfaceIsDefaultInteraction
- Returns:
- define which directions are used in calculating distances.
-
setIncludeInvisible
public final void setIncludeInvisible(boolean includeInvisible)
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.- Parameters:
includeInvisible
- if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
-
isIncludeInvisible
public final boolean isIncludeInvisible()
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.- Specified by:
isIncludeInvisible
in interfaceIsDefaultInteraction
- Returns:
- if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
-
setMode
public final void setMode(InteractionMode mode)
Sets which elements appear in the interaction.- Parameters:
mode
- which elements appear in the interaction.
-
getMode
public final InteractionMode getMode()
Returns which elements appear in the interaction.- Returns:
- which elements appear in the interaction.
-
setIntersect
public final void setIntersect(boolean intersect)
iftrue
, the only applies when the mouse position intersects an item on the chart.- Parameters:
intersect
- iftrue
, the mode only applies when the mouse position intersects an item on the chart.
-
isIntersect
public final boolean isIntersect()
iftrue
, the mode only applies when the mouse position intersects an item on the chart.- Returns:
- if
true
, the mode only applies when the mouse position intersects an item on the chart.
-
-