Interface TooltipBodyCallback
-
- All Known Implementing Classes:
AbstractTooltipBodyCallback
public interface TooltipBodyCallback
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 body.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default List<String>
onAfterBody(IsChart chart, List<TooltipItem> items)
Returns text to render after the body section.
If returnsnull
or empty list, it will be ignored.default List<String>
onBeforeBody(IsChart chart, List<TooltipItem> items)
Returns text to render before the body section.
If returnsnull
or empty list, it will be ignored.
-
-
-
Method Detail
-
onBeforeBody
default List<String> onBeforeBody(IsChart chart, List<TooltipItem> items)
Returns text to render before the body section.
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 body.
-
onAfterBody
default List<String> onAfterBody(IsChart chart, List<TooltipItem> items)
Returns text to render after the body section.
If returnsnull
or empty list, it will be ignored.- Parameters:
chart
- chart instanceitems
- list of all tooltips items- Returns:
- a list of labels to apply to the body.
-
-