Interface TooltipTitleCallback
-
- All Known Implementing Classes:
AbstractTooltipTitleCallback
public interface TooltipTitleCallback
The tooltip label configuration is nested below the tooltip configuration using the callbacks key.
The tooltip has the following callbacks for providing text.
All functions must return either a string or an array of strings. Arrays of strings are treated as multiple lines of text.
This interface takes care about labels to apply to the title.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default List<String>
onAfterTitle(IsChart chart, List<TooltipItem> items)
Returns text to render after the title.
If returnsnull
or empty list, it will be ignored.default List<String>
onBeforeTitle(IsChart chart, List<TooltipItem> items)
Returns the text to render before the title.
If returnsnull
or empty list, it will be ignored.default List<String>
onTitle(IsChart chart, List<TooltipItem> items)
Returns text to render as the title of the tooltip.
If returnsnull
or empty list, it will be ignored.
-
-
-
Method Detail
-
onBeforeTitle
default List<String> onBeforeTitle(IsChart chart, List<TooltipItem> items)
Returns the text to render before the title.
If returnsnull
or empty list, it will be ignored.- Parameters:
chart
- chart instanceitems
- list of all tooltip items- Returns:
- a list of labels to apply to the title.
-
onTitle
default List<String> onTitle(IsChart chart, List<TooltipItem> items)
Returns text to render as the title of the tooltip.
If returnsnull
or empty list, it will be ignored.- Parameters:
chart
- chart instanceitems
- list of all tooltip items- Returns:
- a list of labels to apply to the title.
-
onAfterTitle
default List<String> onAfterTitle(IsChart chart, List<TooltipItem> items)
Returns text to render after the title.
If returnsnull
or empty list, it will be ignored.- Parameters:
chart
- chart instanceitems
- list of all tooltip items- Returns:
- a list of labels to apply to the title.
-
-