Class CartesianScaleTitle
- java.lang.Object
-
- org.pepstock.charba.client.configuration.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScaleTitleAlign
getAlign()
Returns the alignment of the axis title.Axis
getAxis()
Returns the axis instance.IsColor
getColor()
Returns the font color.String
getColorAsString()
Returns the font color as string.Font
getFont()
Returns the font element.Padding
getPadding()
Returns the padding element.List<String>
getText()
Returns the title text to display, as a list of strings.boolean
isDisplay()
If true, display the axis title.void
setAlign(ScaleTitleAlign align)
Sets the alignment of the axis title.void
setColor(String color)
Sets the font color.void
setColor(IsColor color)
Sets the font color.void
setDisplay(boolean display)
If true, display the axis title.void
setText(String... text)
Sets the title text to display.
If specified as an array, text is rendered on multiple lines.
-
-
-
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
-
-