Class TooltipModel

  • All Implemented Interfaces:
    IsPoint

    public final class TooltipModel
    extends AbstractReadOnlyPoint
    This object is passed by CHART.JS to the callback to manage tooltip custom callback.
    The tooltip label configuration is nested below the tooltip configuration using the callbacks key.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • TooltipModel

        public TooltipModel​(ConfigurationEnvelop<NativeObject> envelop)
        Creates the item using envelop with the native java script object which contains all properties.
        Parameters:
        envelop - envelop with the native java script object which contains all properties.
      • TooltipModel

        public TooltipModel​(CallbacksEnvelop<NativeObject> envelop)
        Creates the item using envelop with the native java script object which contains all properties.
        Parameters:
        envelop - envelop with the native java script object which contains all properties.
    • Method Detail

      • getDataPoints

        public List<TooltipItem> getDataPoints()
        Returns the list of tooltip items related to data points.
        Returns:
        the list of tooltip items related to data points.
      • getXAlign

        public TooltipAlign getXAlign()
        Returns the alignment of the tooltip caret in the X direction.
        Returns:
        the alignment of the tooltip caret in the X direction
      • getYAlign

        public TooltipAlign getYAlign()
        Returns the alignment of the tooltip caret in the Y direction.
        Returns:
        the alignment of the tooltip caret in the Y direction
      • getWidth

        public int getWidth()
        Returns the width of tooltip.
        Returns:
        the width of tooltip.
      • getHeight

        public int getHeight()
        Returns the height of tooltip.
        Returns:
        the height of tooltip.
      • getCaretX

        public int getCaretX()
        Returns the X location of the tooltip arrow.
        Returns:
        the X location of the tooltip arrow.
      • getCaretY

        public int getCaretY()
        Returns the Y location of the tooltip arrow.
        Returns:
        the Y location of the tooltip arrow.
      • getBody

        public List<TooltipBodyItem> getBody()
        Returns the list of items which belong to the tooltip body section.
        Returns:
        the list of items which belong to the tooltip body section.
      • getBeforeBody

        public List<String> getBeforeBody()
        Returns the list of lines before body section.
        Returns:
        the list of lines before body section.
      • getAfterBody

        public List<String> getAfterBody()
        Returns the list of lines after body section.
        Returns:
        the list of lines after body section.
      • getTitle

        public List<String> getTitle()
        Returns the title of the tooltip.
        Returns:
        the title of the tooltip.
      • getFooter

        public List<String> getFooter()
        Returns the footer of the tooltip.
        Returns:
        the footer of the tooltip.
      • getLabelColors

        public List<TooltipLabelColor> getLabelColors()
        Returns the list of labels color of tooltip.
        Returns:
        the list of labels color of tooltip.
      • getLabelPointStyles

        public List<TooltipLabelPointStyle> getLabelPointStyles()
        Returns the list of labels point styles of tooltip.
        Returns:
        the list of labels point styles of tooltip.
      • getTextLabelColors

        public List<TooltipLabelColor> getTextLabelColors()
        Returns the list of labels text color of tooltip.
        Returns:
        the list of labels text color of tooltip.
      • getOpacity

        public double getOpacity()
        Returns the opacity of tooltip.
        Returns:
        the opacity of tooltip.