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 Detail

      • onBeforeTitle

        default List<String> onBeforeTitle​(IsChart chart,
                                           List<TooltipItem> items)
        Returns the text to render before the title.
        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 title.
      • onTitle

        default List<String> onTitle​(IsChart chart,
                                     List<TooltipItem> items)
        Returns text to render as the title of the tooltip.
        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 title.
      • onAfterTitle

        default List<String> onAfterTitle​(IsChart chart,
                                          List<TooltipItem> items)
        Returns text to render after the title.
        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 title.