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 elements appear in the tooltip, hovering the chart.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description InteractionAxisgetAxis()Returns to 'x', 'y', or 'xy' to define which directions are used in calculating distances.InteractionModegetMode()Returns which elements appear in the tooltip.booleanisIntersect()iftrue, the hover mode only applies when the mouse position intersects an item on the chart.voidsetAxis(InteractionAxis axis)Sets to 'x', 'y', or 'xy' to define which directions are used in calculating distances.
 Defaults to 'x' for index mode and 'xy' in dataset and nearest modes.voidsetIntersect(boolean intersect)iftrue, the hover mode only applies when the mouse position intersects an item on the chart.voidsetMode(InteractionMode mode)Sets which elements appear in the tooltip.- 
Methods inherited from class org.pepstock.charba.client.options.AbstractModelgetDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
 - 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, 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.NativeObjectContainercheckDefaultValuesArgument, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultInteractiongetMode, isIntersect
 
- 
 
- 
- 
- 
Method Detail- 
setAxispublic final void setAxis(InteractionAxis axis) Sets to 'x', 'y', or 'xy' to define which directions are used in calculating distances.
 Defaults to 'x' for index mode and 'xy' in dataset and nearest modes.- Parameters:
- axis- define which directions are used in calculating distances.
 
 - 
getAxispublic final InteractionAxis getAxis() Returns to 'x', 'y', or 'xy' to define which directions are used in calculating distances.- Specified by:
- getAxisin interface- IsDefaultInteraction
- Returns:
- define which directions are used in calculating distances.
 
 - 
setModepublic final void setMode(InteractionMode mode) Sets which elements appear in the tooltip.- Parameters:
- mode- which elements appear in the tooltip.
 
 - 
getModepublic final InteractionMode getMode() Returns which elements appear in the tooltip.- Returns:
- which elements appear in the tooltip.
 
 - 
setIntersectpublic final void setIntersect(boolean intersect) iftrue, the hover mode only applies when the mouse position intersects an item on the chart.- Parameters:
- intersect- if- true, the hover mode only applies when the mouse position intersects an item on the chart.
 
 - 
isIntersectpublic final boolean isIntersect() iftrue, the hover mode only applies when the mouse position intersects an item on the chart.- Returns:
- if true, the hover mode only applies when the mouse position intersects an item on the chart.
 
 
- 
 
-