Class ScaleTitle
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<AbstractScale,IsDefaultScaleTitle>
-
- org.pepstock.charba.client.options.ScaleTitle
-
- All Implemented Interfaces:
IsDefaultFontContainer,IsDefaultScaleTitle,HasFont
public final class ScaleTitle extends AbstractModel<AbstractScale,IsDefaultScaleTitle> implements IsDefaultScaleTitle, HasFont
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 ScaleTitleAligngetAlign()Returns the alignment of the axis title.FontContainergetFontContainer()Returns a font container instance to use in the default methods of this interface.PaddinggetPadding()Returns the padding element.List<String>getText()Returns the title text to display, as a list of strings.booleanisDisplay()Iftrue, display the axis title.voidsetAlign(ScaleTitleAlign align)Sets the alignment of the axis title.voidsetDisplay(boolean display)Iftrue, display the axis title.voidsetText(String... text)Sets the title text to display.
If specified as an array, text is rendered on multiple lines.-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getFontContainer
public FontContainer getFontContainer()
Description copied from interface:HasFontReturns a font container instance to use in the default methods of this interface.- Specified by:
getFontContainerin interfaceHasFont- Returns:
- a font container instance
-
getPadding
public Padding getPadding()
Returns the padding element.- Specified by:
getPaddingin interfaceIsDefaultScaleTitle- Returns:
- the padding
-
setDisplay
public void setDisplay(boolean display)
Iftrue, display the axis title.- Parameters:
display- iftrue, display the axis title.
-
isDisplay
public boolean isDisplay()
Iftrue, display the axis title.- Specified by:
isDisplayin interfaceIsDefaultScaleTitle- 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 or an empty list if not exist
-
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.- Specified by:
getAlignin interfaceIsDefaultScaleTitle- Returns:
- the alignment of the axis title
-
-