Class Tooltip

    • Constructor Detail

      • Tooltip

        public Tooltip()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Gets the enabled
        Returns:
        enabled
      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets the enabled
        Parameters:
        enabled - Are on-canvas tooltips enabled
      • getMode

        public String getMode()
        Gets the mode
        Returns:
        mode
      • setMode

        public void setMode​(String mode)
        Sets the mode
        Parameters:
        mode - Sets which elements appear in the tooltip.
      • isIntersect

        public boolean isIntersect()
        Gets the intersect
        Returns:
        intersect
      • setIntersect

        public void setIntersect​(boolean intersect)
        Sets the intersect
        Parameters:
        intersect - if true, the tooltip mode applies only when the mouse position intersects with an element. If false, the mode will be applied at all times.
      • getPosition

        public String getPosition()
        Gets the position
        Returns:
        position
      • setPosition

        public void setPosition​(String position)
        Sets the position
        Parameters:
        position - The mode for positioning the tooltip.
      • getBackgroundColor

        public String getBackgroundColor()
        Gets the backgroundColor
        Returns:
        backgroundColor
      • setBackgroundColor

        public void setBackgroundColor​(String backgroundColor)
        Sets the backgroundColor
        Parameters:
        backgroundColor - Background color of the tooltip.
      • getTitleFontFamily

        public String getTitleFontFamily()
        Gets the titleFontFamily
        Returns:
        titleFontFamily
      • setTitleFontFamily

        public void setTitleFontFamily​(String titleFontFamily)
        Sets the titleFontFamily
        Parameters:
        titleFontFamily - title font
      • getTitleFontSize

        public Number getTitleFontSize()
        Gets the titleFontSize
        Returns:
        titleFontSize
      • setTitleFontSize

        public void setTitleFontSize​(Number titleFontSize)
        Sets the titleFontSize
        Parameters:
        titleFontSize - Title font size
      • getTitleFontStyle

        public String getTitleFontStyle()
        Gets the titleFontStyle
        Returns:
        titleFontStyle
      • setTitleFontStyle

        public void setTitleFontStyle​(String titleFontStyle)
        Sets the titleFontStyle
        Parameters:
        titleFontStyle - Title font style
      • getTitleFontColor

        public String getTitleFontColor()
        Gets the titleFontColor
        Returns:
        titleFontColor
      • setTitleFontColor

        public void setTitleFontColor​(String titleFontColor)
        Sets the titleFontColor
        Parameters:
        titleFontColor - Title font color
      • getTitleSpacing

        public Number getTitleSpacing()
        Gets the titleSpacing
        Returns:
        titleSpacing
      • setTitleSpacing

        public void setTitleSpacing​(Number titleSpacing)
        Sets the titleSpacing
        Parameters:
        titleSpacing - Spacing to add to top and bottom of each title line.
      • getTitleMarginBottom

        public Number getTitleMarginBottom()
        Gets the titleMarginBottom
        Returns:
        titleMarginBottom
      • setTitleMarginBottom

        public void setTitleMarginBottom​(Number titleMarginBottom)
        Sets the titleMarginBottom
        Parameters:
        titleMarginBottom - Margin to add on bottom of title section.
      • getBodyFontFamily

        public String getBodyFontFamily()
        Gets the bodyFontFamily
        Returns:
        bodyFontFamily
      • setBodyFontFamily

        public void setBodyFontFamily​(String bodyFontFamily)
        Sets the bodyFontFamily
        Parameters:
        bodyFontFamily - body line font
      • getBodyFontSize

        public Number getBodyFontSize()
        Gets the bodyFontSize
        Returns:
        bodyFontSize
      • setBodyFontSize

        public void setBodyFontSize​(Number bodyFontSize)
        Sets the bodyFontSize
        Parameters:
        bodyFontSize - Body font size
      • getBodyFontStyle

        public String getBodyFontStyle()
        Gets the bodyFontStyle
        Returns:
        bodyFontStyle
      • setBodyFontStyle

        public void setBodyFontStyle​(String bodyFontStyle)
        Sets the bodyFontStyle
        Parameters:
        bodyFontStyle - Body font style
      • getBodyFontColor

        public String getBodyFontColor()
        Gets the bodyFontColor
        Returns:
        bodyFontColor
      • setBodyFontColor

        public void setBodyFontColor​(String bodyFontColor)
        Sets the bodyFontColor
        Parameters:
        bodyFontColor - Body font color
      • getBodySpacing

        public Number getBodySpacing()
        Gets the bodySpacing
        Returns:
        bodySpacing
      • setBodySpacing

        public void setBodySpacing​(Number bodySpacing)
        Sets the bodySpacing
        Parameters:
        bodySpacing - Spacing to add to top and bottom of each tooltip item.
      • getFooterFontFamily

        public String getFooterFontFamily()
        Gets the footerFontFamily
        Returns:
        footerFontFamily
      • setFooterFontFamily

        public void setFooterFontFamily​(String footerFontFamily)
        Sets the footerFontFamily
        Parameters:
        footerFontFamily - footer font
      • getFooterFontSize

        public Number getFooterFontSize()
        Gets the footerFontSize
        Returns:
        footerFontSize
      • setFooterFontSize

        public void setFooterFontSize​(Number footerFontSize)
        Sets the footerFontSize
        Parameters:
        footerFontSize - Footer font size
      • getFooterFontStyle

        public String getFooterFontStyle()
        Gets the footerFontStyle
        Returns:
        footerFontStyle
      • setFooterFontStyle

        public void setFooterFontStyle​(String footerFontStyle)
        Sets the footerFontStyle
        Parameters:
        footerFontStyle - Footer font style
      • getFooterFontColor

        public String getFooterFontColor()
        Gets the footerFontColor
        Returns:
        footerFontColor
      • setFooterFontColor

        public void setFooterFontColor​(String footerFontColor)
        Sets the footerFontColor
        Parameters:
        footerFontColor - Footer font color
      • getFooterSpacing

        public Number getFooterSpacing()
        Gets the footerSpacing
        Returns:
        footerSpacing
      • setFooterSpacing

        public void setFooterSpacing​(Number footerSpacing)
        Sets the footerSpacing
        Parameters:
        footerSpacing - Spacing to add to top and bottom of each footer line.
      • getFooterMarginTop

        public Number getFooterMarginTop()
        Gets the footerMarginTop
        Returns:
        footerMarginTop
      • setFooterMarginTop

        public void setFooterMarginTop​(Number footerMarginTop)
        Sets the footerMarginTop
        Parameters:
        footerMarginTop - Margin to add before drawing the footer.
      • getXpadding

        public Number getXpadding()
        Gets the xPadding
        Returns:
        xPadding
      • setXpadding

        public void setXpadding​(Number xpadding)
        Sets the xPadding
        Parameters:
        xpadding - Padding to add on left and right of tooltip.
      • getYpadding

        public Number getYpadding()
        Gets the yPadding
        Returns:
        yPadding
      • setYpadding

        public void setYpadding​(Number ypadding)
        Sets the yPadding
        Parameters:
        ypadding - Padding to add on top and bottom of tooltip.
      • getCaretPadding

        public Number getCaretPadding()
        Gets the caretPadding
        Returns:
        caretPadding
      • setCaretPadding

        public void setCaretPadding​(Number caretPadding)
        Sets the caretPadding
        Parameters:
        caretPadding - Extra distance to move the end of the tooltip arrow away from the tooltip point.
      • getCaretSize

        public Number getCaretSize()
        Gets the caretSize
        Returns:
        caretSize
      • setCaretSize

        public void setCaretSize​(Number caretSize)
        Sets the caretSize
        Parameters:
        caretSize - Size, in px, of the tooltip arrow.
      • getCornerRadius

        public Number getCornerRadius()
        Gets the cornerRadius
        Returns:
        cornerRadius
      • setCornerRadius

        public void setCornerRadius​(Number cornerRadius)
        Sets the cornerRadius
        Parameters:
        cornerRadius - Radius of tooltip corner curves.
      • getMultiKeyBackground

        public String getMultiKeyBackground()
        Gets the multiKeyBackground
        Returns:
        multiKeyBackground
      • setMultiKeyBackground

        public void setMultiKeyBackground​(String multiKeyBackground)
        Sets the multiKeyBackground
        Parameters:
        multiKeyBackground - Color to draw behind the colored boxes when multiple items are in the tooltip
      • isDisplayColors

        public boolean isDisplayColors()
        Gets the displayColors
        Returns:
        displayColors
      • setDisplayColors

        public void setDisplayColors​(boolean displayColors)
        Sets the displayColors
        Parameters:
        displayColors - if true, color boxes are shown in the tooltip
      • getBorderColor

        public String getBorderColor()
        Gets the borderColor
        Returns:
        borderColor
      • setBorderColor

        public void setBorderColor​(String borderColor)
        Sets the borderColor
        Parameters:
        borderColor - Color of the border
      • getBorderWidth

        public Number getBorderWidth()
        Gets the borderWidth
        Returns:
        borderWidth
      • setBorderWidth

        public void setBorderWidth​(Number borderWidth)
        Sets the borderWidth
        Parameters:
        borderWidth - Size of the border
      • isRtl

        public boolean isRtl()
        For rendering the legends from right to left.
        Returns:
        the rtl
      • setRtl

        public void setRtl​(boolean rtl)
        For rendering the legends from right to left.
        Parameters:
        rtl - the rtl to set
      • getTextDirection

        public String getTextDirection()
        Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.
        Returns:
        the textDirection
      • setTextDirection

        public void setTextDirection​(String textDirection)
        Text Direction 'ltr' or 'rtl' regardless of the css specified on the canvas.
        Parameters:
        textDirection - the textDirection to set
      • getTitleFont

        public ChartFont getTitleFont()
      • setTitleFont

        public void setTitleFont​(ChartFont titleFont)
      • getBodyFont

        public ChartFont getBodyFont()
      • setBodyFont

        public void setBodyFont​(ChartFont bodyFont)
      • getFooterFont

        public ChartFont getFooterFont()
      • setFooterFont

        public void setFooterFont​(ChartFont footerFont)
      • encode

        public String encode()
                      throws IOException
        Write the options of Tooltip
        Returns:
        options as JSON object
        Throws:
        IOException - If an I/O error occurs