Class AbstractTooltipLabelCallback
- java.lang.Object
-
- org.pepstock.charba.client.callbacks.AbstractTooltipLabelCallback
-
- All Implemented Interfaces:
TooltipLabelCallback
public abstract class AbstractTooltipLabelCallback extends Object implements TooltipLabelCallback
Abstract implementation of tooltip label callback in order to help who will implement it to override ONLY needed methods and use the default for the others.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description AbstractTooltipLabelCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
onLabel(IsChart chart, TooltipItem item)
Returns text to render for an individual item in the tooltip.
If returnsnull
or empty list, it will be ignored.TooltipLabelColor
onLabelColor(IsChart chart, TooltipItem item)
Returns the colors and borders to render for the tooltip item.
If returnsnull
, it will be ignored.IsColor
onLabelTextColor(IsChart chart, TooltipItem item)
Returns the colors for the text of the label for the tooltip item.
If returnsnull
, it will be ignored.-
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.callbacks.TooltipLabelCallback
onAfterLabel, onBeforeLabel, onLabelPointStyle
-
-
-
-
Method Detail
-
onLabel
public List<String> onLabel(IsChart chart, TooltipItem item)
Description copied from interface:TooltipLabelCallback
Returns text to render for an individual item in the tooltip.
If returnsnull
or empty list, it will be ignored.- Specified by:
onLabel
in interfaceTooltipLabelCallback
- Parameters:
chart
- chart instanceitem
- tooltip item- Returns:
- label to be applied.
-
onLabelColor
public TooltipLabelColor onLabelColor(IsChart chart, TooltipItem item)
Description copied from interface:TooltipLabelCallback
Returns the colors and borders to render for the tooltip item.
If returnsnull
, it will be ignored.- Specified by:
onLabelColor
in interfaceTooltipLabelCallback
- Parameters:
chart
- chart instanceitem
- tooltip item- Returns:
- label color to be applied.
-
onLabelTextColor
public IsColor onLabelTextColor(IsChart chart, TooltipItem item)
Description copied from interface:TooltipLabelCallback
Returns the colors for the text of the label for the tooltip item.
If returnsnull
, it will be ignored.- Specified by:
onLabelTextColor
in interfaceTooltipLabelCallback
- Parameters:
chart
- chart instanceitem
- tooltip item- Returns:
- label text color to be applied.
-
-