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 Detail

      • onBeforeBody

        default List<String> onBeforeBody​(IsChart chart,
                                          List<TooltipItem> items)
        Returns text to render before the body section.
        If returns null or empty list, it will be ignored.
        Parameters:
        chart - chart instance
        items - 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 returns null or empty list, it will be ignored.
        Parameters:
        chart - chart instance
        items - list of all tooltips items
        Returns:
        a list of labels to apply to the body.