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 IsColor
getBackdropColor()
Returns the background color of the point label.String
getBackdropColorAsString()
Returns the background color of the point label.Padding
getBackdropPadding()
Returns the padding of label backdrop.int
getBorderRadius()
Returns the border radius (in pixels).BarBorderRadius
getBorderRadiusAsObject()
Returns the border radius (in pixels).Display
getDisplay()
The display option controls the visibility of labels.
Controls the axis global visibility (visible when true, hidden when false).FontContainer
getFontContainer()
Returns a font container instance to use in the default methods of this interface.int
getPadding()
Returns the padding between chart and point labels, in pixels.boolean
isCentered()
Returns if point labels are centered.void
setBackdropColor(String backdropColor)
Sets the background color of the point label.void
setBackdropColor(IsColor backdropColor)
Sets the background color of the point label.void
setBorderRadius(int radius)
Sets the border radius.void
setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).void
setCentered(boolean centered)
Setstrue
if point labels are centered.void
setDisplay(boolean display)
Iftrue
, labels are shown.void
setDisplay(Display display)
The display option controls the visibility of labels.
Controls the axis global visibility (visible when true, hidden when false).void
setPadding(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:HasFont
Returns a font container instance to use in the default methods of this interface.- Specified by:
getFontContainer
in interfaceHasFont
- Returns:
- a font container instance
-
getBackdropPadding
public Padding getBackdropPadding()
Returns the padding of label backdrop.- Specified by:
getBackdropPadding
in 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:
getDisplay
in 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:
getBackdropColorAsString
in 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:
getPadding
in interfaceIsDefaultPointLabels
- Returns:
- padding the padding between chart and point labels, in pixels.
-
setCentered
public void setCentered(boolean centered)
Setstrue
if point labels are centered.- Parameters:
centered
-true
if point labels are centered.
-
isCentered
public boolean isCentered()
Returns if point labels are centered.- Specified by:
isCentered
in 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:
getBorderRadius
in interfaceIsDefaultPointLabels
- Returns:
- the border radius (in pixels).
-
getBorderRadiusAsObject
public BarBorderRadius getBorderRadiusAsObject()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
-