Package org.pepstock.charba.client.items
Class TooltipModel
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.TooltipModel
-
public final class TooltipModel extends NativeObjectContainer
This object is passed by CHART.JS to the callback to manage tooltip custom callback.
The tooltip label configuration is nested below the tooltip configuration using the callbacks key.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description TooltipModel(CallbacksEnvelop<NativeObject> envelop)
Creates the item using envelop with the native java script object which contains all properties.TooltipModel(ConfigurationEnvelop<NativeObject> envelop)
Creates the item using envelop with the native java script object which contains all properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAfterBody()
Returns the list of lines after body section.List<String>
getBeforeBody()
Returns the list of lines before body section.List<TooltipBodyItem>
getBody()
Returns the list of items which belong to the tooltip body section.int
getCaretX()
Returns the X location of the tooltip arrow.int
getCaretY()
Returns the Y location of the tooltip arrow.List<TooltipItem>
getDataPoints()
Returns the list of tooltip items related to data points.List<String>
getFooter()
Returns the footer of the tooltip.int
getHeight()
Returns the height of tooltip.List<TooltipLabelColor>
getLabelColors()
Returns the list of labels color of tooltip.List<TooltipLabelPointStyle>
getLabelPointStyles()
Returns the list of labels point styles of tooltip.double
getOpacity()
Returns the opacity of tooltip.List<TooltipLabelColor>
getTextLabelColors()
Returns the list of labels text color of tooltip.List<String>
getTitle()
Returns the title of the tooltip.int
getWidth()
Returns the width of tooltip.int
getX()
Returns the X location of tooltip.TooltipAlign
getXAlign()
Returns the alignment of the tooltip caret in the X direction.int
getY()
Returns the Y location of tooltip.TooltipAlign
getYAlign()
Returns the alignment of the tooltip caret in the Y direction.-
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
TooltipModel
public TooltipModel(ConfigurationEnvelop<NativeObject> envelop)
Creates the item using envelop with the native java script object which contains all properties.- Parameters:
envelop
- envelop with the native java script object which contains all properties.
-
TooltipModel
public TooltipModel(CallbacksEnvelop<NativeObject> envelop)
Creates the item using envelop with the native java script object which contains all properties.- Parameters:
envelop
- envelop with the native java script object which contains all properties.
-
-
Method Detail
-
getDataPoints
public List<TooltipItem> getDataPoints()
Returns the list of tooltip items related to data points.- Returns:
- the list of tooltip items related to data points.
-
getXAlign
public TooltipAlign getXAlign()
Returns the alignment of the tooltip caret in the X direction.- Returns:
- the alignment of the tooltip caret in the X direction
-
getYAlign
public TooltipAlign getYAlign()
Returns the alignment of the tooltip caret in the Y direction.- Returns:
- the alignment of the tooltip caret in the Y direction
-
getX
public int getX()
Returns the X location of tooltip.- Returns:
- the X location of tooltip.
-
getY
public int getY()
Returns the Y location of tooltip.- Returns:
- the Y location of tooltip.
-
getWidth
public int getWidth()
Returns the width of tooltip.- Returns:
- the width of tooltip.
-
getHeight
public int getHeight()
Returns the height of tooltip.- Returns:
- the height of tooltip.
-
getCaretX
public int getCaretX()
Returns the X location of the tooltip arrow.- Returns:
- the X location of the tooltip arrow.
-
getCaretY
public int getCaretY()
Returns the Y location of the tooltip arrow.- Returns:
- the Y location of the tooltip arrow.
-
getBody
public List<TooltipBodyItem> getBody()
Returns the list of items which belong to the tooltip body section.- Returns:
- the list of items which belong to the tooltip body section.
-
getBeforeBody
public List<String> getBeforeBody()
Returns the list of lines before body section.- Returns:
- the list of lines before body section.
-
getAfterBody
public List<String> getAfterBody()
Returns the list of lines after body section.- Returns:
- the list of lines after body section.
-
getTitle
public List<String> getTitle()
Returns the title of the tooltip.- Returns:
- the title of the tooltip.
-
getFooter
public List<String> getFooter()
Returns the footer of the tooltip.- Returns:
- the footer of the tooltip.
-
getLabelColors
public List<TooltipLabelColor> getLabelColors()
Returns the list of labels color of tooltip.- Returns:
- the list of labels color of tooltip.
-
getLabelPointStyles
public List<TooltipLabelPointStyle> getLabelPointStyles()
Returns the list of labels point styles of tooltip.- Returns:
- the list of labels point styles of tooltip.
-
getTextLabelColors
public List<TooltipLabelColor> getTextLabelColors()
Returns the list of labels text color of tooltip.- Returns:
- the list of labels text color of tooltip.
-
getOpacity
public double getOpacity()
Returns the opacity of tooltip.- Returns:
- the opacity of tooltip.
-
-