Class CartesianScaleTitle


  • public class CartesianScaleTitle
    extends Object
    When creating a chart, you want to tell the viewer what data they are viewing. To do this, you need to label the axis.
    The scale title configuration defines options for the scale title.
    Note that this only applies to cartesian axes.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • getFont

        public Font getFont()
        Returns the font element.
        Returns:
        the font
      • setColor

        public void setColor​(IsColor color)
        Sets the font color.
        Parameters:
        color - font color.
      • setColor

        public void setColor​(String color)
        Sets the font color.
        Parameters:
        color - font color.
      • getColorAsString

        public String getColorAsString()
        Returns the font color as string.
        Returns:
        font color as string
      • getColor

        public IsColor getColor()
        Returns the font color.
        Returns:
        font color
      • getPadding

        public Padding getPadding()
        Returns the padding element.
        Returns:
        the padding
      • setDisplay

        public void setDisplay​(boolean display)
        If true, display the axis title.
        Parameters:
        display - If true, display the axis title.
      • isDisplay

        public boolean isDisplay()
        If true, display the axis title.
        Returns:
        If true, display the axis title.
      • setText

        public void setText​(String... text)
        Sets the title text to display.
        If specified as an array, text is rendered on multiple lines.
        Parameters:
        text - the title text to display.
        If specified as an array, text is rendered on multiple lines.
      • getText

        public List<String> getText()
        Returns the title text to display, as a list of strings.
        Returns:
        a list of strings
      • setAlign

        public void setAlign​(ScaleTitleAlign align)
        Sets the alignment of the axis title.
        Parameters:
        align - the alignment of the axis title
      • getAlign

        public ScaleTitleAlign getAlign()
        Returns the alignment of the axis title.
        Returns:
        the alignment of the axis title
      • getAxis

        public final Axis getAxis()
        Returns the axis instance.
        Returns:
        the axis