Class PointLabels
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<AbstractScale,IsDefaultPointLabels>
-
- org.pepstock.charba.client.options.PointLabels
-
- All Implemented Interfaces:
IsDefaultFontContainer,IsDefaultPointLabels,HasFont
public final class PointLabels extends AbstractModel<AbstractScale,IsDefaultPointLabels> implements IsDefaultPointLabels, HasFont
It is used to configure the point labels that are shown on the perimeter of the scale.
Note that these options only apply if display istrue.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsColorgetBackdropColor()Returns the background color of the point label.StringgetBackdropColorAsString()Returns the background color of the point label.PaddinggetBackdropPadding()Returns the padding of label backdrop.intgetBorderRadius()Returns the border radius (in pixels).BarBorderRadiusgetBorderRadiusAsObject()Returns the border radius (in pixels).DisplaygetDisplay()The display option controls the visibility of labels.
Controls the axis global visibility (visible when true, hidden when false).FontContainergetFontContainer()Returns a font container instance to use in the default methods of this interface.intgetPadding()Returns the padding between chart and point labels, in pixels.booleanisCentered()Returns if point labels are centered.voidsetBackdropColor(String backdropColor)Sets the background color of the point label.voidsetBackdropColor(IsColor backdropColor)Sets the background color of the point label.voidsetBorderRadius(int radius)Sets the border radius.voidsetBorderRadius(BarBorderRadius borderRadius)Sets the border radius (in pixels).voidsetCentered(boolean centered)Setstrueif point labels are centered.voidsetDisplay(boolean display)Iftrue, labels are shown.voidsetDisplay(Display display)The display option controls the visibility of labels.
Controls the axis global visibility (visible when true, hidden when false).voidsetPadding(int padding)Sets the padding between chart and point labels, in pixels.-
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, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, 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
checkAndGetColor, 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, 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, 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
-
getBackdropPadding
public Padding getBackdropPadding()
Returns the padding of label backdrop.- Specified by:
getBackdropPaddingin interfaceIsDefaultPointLabels- Returns:
- padding of label backdrop.
-
setDisplay
public void setDisplay(boolean display)
Iftrue, labels are shown.- Parameters:
display- iftrue, labels are shown.
-
setDisplay
public void setDisplay(Display display)
The display option controls the visibility of labels.
Controls the axis global visibility (visible when true, hidden when false). When display: 'auto', the labels are visible only if there is enough space to draw them.- Parameters:
display- display option controls the visibility of labels
-
getDisplay
public Display getDisplay()
The display option controls the visibility of labels.
Controls the axis global visibility (visible when true, hidden when false). When display: 'auto', the labels are visible only if there is enough space to draw them.- Specified by:
getDisplayin interfaceIsDefaultPointLabels- Returns:
- display option controls the visibility of labels
-
setBackdropColor
public void setBackdropColor(IsColor backdropColor)
Sets the background color of the point label.- Parameters:
backdropColor- the background color of the point label
-
setBackdropColor
public void setBackdropColor(String backdropColor)
Sets the background color of the point label.- Parameters:
backdropColor- the background color of the point label
-
getBackdropColorAsString
public String getBackdropColorAsString()
Returns the background color of the point label.- Specified by:
getBackdropColorAsStringin interfaceIsDefaultPointLabels- Returns:
- the background color of the point label
-
getBackdropColor
public IsColor getBackdropColor()
Returns the background color of the point label.- Returns:
- the background color of the point label
-
setPadding
public void setPadding(int padding)
Sets the padding between chart and point labels, in pixels.- Parameters:
padding- the padding between chart and point labels, in pixels.
-
getPadding
public int getPadding()
Returns the padding between chart and point labels, in pixels.- Specified by:
getPaddingin interfaceIsDefaultPointLabels- Returns:
- padding the padding between chart and point labels, in pixels.
-
setCentered
public void setCentered(boolean centered)
Setstrueif point labels are centered.- Parameters:
centered-trueif point labels are centered.
-
isCentered
public boolean isCentered()
Returns if point labels are centered.- Specified by:
isCenteredin interfaceIsDefaultPointLabels- Returns:
- if point labels are centered
-
setBorderRadius
public void setBorderRadius(int radius)
Sets the border radius.- Parameters:
radius- the border radius.
-
setBorderRadius
public void setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius- the border radius (in pixels).
-
getBorderRadius
public int getBorderRadius()
Returns the border radius (in pixels).- Specified by:
getBorderRadiusin interfaceIsDefaultPointLabels- Returns:
- the border radius (in pixels).
-
getBorderRadiusAsObject
public BarBorderRadius getBorderRadiusAsObject()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
-