public final class DataLabelsOptions extends LabelItem
DataLabelsPlugin.ID
plugin options where to set all the configuration needed to the plugin.DataLabelsPlugin.ID
plugin is highly customizable CHART.JS plugin that displays labels on data for any type of charts.Modifier and Type | Field and Description |
---|---|
static Align |
DEFAULT_ALIGN
Default position of the label relative to the anchor point position and orientation,
Align.CENTER . |
static Anchor |
DEFAULT_ANCHOR
Default anchor point, which is defined by an orientation vector and a position on the data element,
Anchor.CENTER . |
static String |
DEFAULT_BACKGROUND_COLOR
Default background color,
null , and uses the background color of dataset. |
static String |
DEFAULT_BORDER_COLOR
Default border color,
null , and uses the border color of dataset. |
static double |
DEFAULT_BORDER_RADIUS
Default border radius of labels, 0.0.
|
static int |
DEFAULT_BORDER_WIDTH
Default border width of labels, 0.
|
static boolean |
DEFAULT_CLAMP
Default to enforce the anchor position to be calculated based on the visible geometry of the associated element, false.
|
static boolean |
DEFAULT_CLIP
Default to enforce the part of the label which is outside the chart area will be masked, false.
|
static Display |
DEFAULT_DISPLAY
Default visibility of labels,
Display.TRUE . |
static int |
DEFAULT_OFFSET
Default distance (in pixels) to pull the label away from the anchor point, 4.
|
static double |
DEFAULT_OPACITY
Default opacity, 1.0.
|
static double |
DEFAULT_ROTATION
Default clockwise rotation angle (in degrees) of the label, 0.0.
|
static TextAlign |
DEFAULT_TEXT_ALIGN
Default text alignment being used when drawing the label text,
TextAlign.START . |
static double |
DEFAULT_TEXT_SHADOW_BLUR
Default text shadow blur, 0.0.
|
static int |
DEFAULT_TEXT_STROKE_WIDTH
Default text stroke width, 0.
|
Constructor and Description |
---|
DataLabelsOptions()
Creates new
DataLabelsPlugin.ID plugin options. |
DataLabelsOptions(IsChart chart)
Creates new
DataLabelsPlugin.ID plugin options, relating to chart instance for default. |
Modifier and Type | Method and Description |
---|---|
protected void |
applyingDefaults()
This is invoked before storing the plugins options as default.
|
default Align |
getAlign()
Returns the position of the label relative to the anchor point position and orientation.
|
default AlignCallback |
getAlignCallback()
Returns the align callback.
|
default Anchor |
getAnchor()
Returns the anchor point, which is defined by an orientation vector and a position on the data element
|
default AnchorCallback |
getAnchorCallback()
Returns the anchor callback.
|
default String |
getBackgroundColorAsString()
Returns the background color as string.
|
default ColorCallback<DataLabelsContext> |
getBackgroundColorCallback()
Returns the background color callback.
|
default String |
getBorderColorAsString()
Returns the border color as string.
|
default ColorCallback<DataLabelsContext> |
getBorderColorCallback()
Returns the border color callback.
|
default double |
getBorderRadius()
Returns the border radius.
|
default RadiusCallback<DataLabelsContext> |
getBorderRadiusCallback()
Returns the border radius callback.
|
default int |
getBorderWidth()
Returns the border width.
|
default WidthCallback<DataLabelsContext> |
getBorderWidthCallback()
Returns the border width callback.
|
default ClampCallback |
getClampCallback()
Returns the clamp callback.
|
default ClipCallback |
getClipCallback()
Returns the clip callback.
|
default String |
getColorAsString()
Returns the color as string.
|
default ColorCallback<DataLabelsContext> |
getColorCallback()
Returns the color callback.
|
default Display |
getDisplay()
Returns the visibility of labels.
|
default DisplayCallback |
getDisplayCallback()
Returns the display callback.
|
IsDefaultFont |
getFont()
Returns the font element.
|
default FontCallback<DataLabelsContext> |
getFontCallback()
Returns the font callback.
|
default FormatterCallback |
getFormatterCallback()
Returns the formatter callback.
|
Labels |
getLabels()
Returns the labels element.
|
org.pepstock.charba.client.datalabels.IsDefaultListeners |
getListeners()
Returns the listeners element.
|
default int |
getOffset()
Returns the distance (in pixels) to pull the label away from the anchor point.
|
default OffsetCallback<DataLabelsContext> |
getOffsetCallback()
Returns the offset callback.
|
default double |
getOpacity()
Returns the opacity.
|
default OpacityCallback |
getOpacityCallback()
Returns the opacity callback.
|
IsDefaultPadding |
getPadding()
Returns the padding element.
|
default PaddingCallback<DataLabelsContext> |
getPaddingCallback()
Returns the padding callback.
|
default double |
getRotation()
Returns the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.
|
default RotationCallback<DataLabelsContext> |
getRotationCallback()
Returns the rotation callback.
|
default TextAlign |
getTextAlign()
Returns the text alignment being used when drawing the label text.
|
default TextAlignCallback<DataLabelsContext> |
getTextAlignCallback()
Returns the text align callback.
|
default double |
getTextShadowBlur()
Returns the text shadow blur.
|
default TextShadowBlurCallback |
getTextShadowBlurCallback()
Returns the text shadow blur callback.
|
default String |
getTextShadowColorAsString()
Returns the text shadow color as string.
|
default ColorCallback<DataLabelsContext> |
getTextShadowColorCallback()
Returns the text shadow color callback.
|
default String |
getTextStrokeColorAsString()
Returns the text stroke color as string.
|
default ColorCallback<DataLabelsContext> |
getTextStrokeColorCallback()
Returns the text stroke color callback.
|
default int |
getTextStrokeWidth()
Returns the text stroke width.
|
default WidthCallback<DataLabelsContext> |
getTextStrokeWidthCallback()
Returns the text stroke width callback.
|
default boolean |
isClamp()
Returns
true to enforce the anchor position to be calculated based on the visible geometry of the associated element (i.e. |
default boolean |
isClip()
When the clip option is
true , the part of the label which is outside the chart area will be masked. |
getAlign, getAlignCallback, getAlignDegrees, getAnchor, getAnchorCallback, getBackgroundColor, getBackgroundColorAsString, getBackgroundColorCallback, getBorderColor, getBorderColorAsString, getBorderColorCallback, getBorderRadius, getBorderRadiusCallback, getBorderWidth, getBorderWidthCallback, getClampCallback, getClipCallback, getColor, getColorAsString, getColorCallback, getDisplay, getDisplayCallback, getFont, getFontCallback, getFormatterCallback, getListeners, getOffset, getOffsetCallback, getOpacity, getOpacityCallback, getPadding, getPaddingCallback, getRotation, getRotationCallback, getTextAlign, getTextAlignCallback, getTextShadowBlur, getTextShadowBlurCallback, getTextShadowColor, getTextShadowColorAsString, getTextShadowColorCallback, getTextStrokeColor, getTextStrokeColorAsString, getTextStrokeColorCallback, getTextStrokeWidth, getTextStrokeWidthCallback, isClamp, isClip, setAlign, setAlign, setAlign, setAlign, setAnchor, setAnchor, setAnchor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderRadius, setBorderRadius, setBorderRadius, setBorderWidth, setBorderWidth, setBorderWidth, setClamp, setClamp, setClamp, setClip, setClip, setClip, setColor, setColor, setColor, setColor, setDisplay, setDisplay, setDisplay, setDisplay, setFont, setFont, setFormatter, setListenersHandler, setOffset, setOffset, setOffset, setOpacity, setOpacity, setOpacity, setPadding, setPadding, setRotation, setRotation, setRotation, setTextAlign, setTextAlign, setTextAlign, setTextShadowBlur, setTextShadowBlur, setTextShadowBlur, setTextShadowColor, setTextShadowColor, setTextShadowColor, setTextShadowColor, setTextStrokeColor, setTextStrokeColor, setTextStrokeColor, setTextStrokeColor, setTextStrokeWidth, setTextStrokeWidth, setTextStrokeWidth
applyingDefaults, getEvents, getId, getPluginId, loadGlobalsPluginOptions, setEvents, setEvents, store, store, store, store
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, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final Align DEFAULT_ALIGN
Align.CENTER
.public static final Anchor DEFAULT_ANCHOR
Anchor.CENTER
.public static final String DEFAULT_BACKGROUND_COLOR
null
, and uses the background color of dataset.public static final String DEFAULT_BORDER_COLOR
null
, and uses the border color of dataset.public static final double DEFAULT_BORDER_RADIUS
public static final int DEFAULT_BORDER_WIDTH
public static final boolean DEFAULT_CLAMP
public static final boolean DEFAULT_CLIP
public static final Display DEFAULT_DISPLAY
Display.TRUE
.public static final int DEFAULT_OFFSET
public static final double DEFAULT_OPACITY
public static final double DEFAULT_ROTATION
public static final TextAlign DEFAULT_TEXT_ALIGN
TextAlign.START
.public static final int DEFAULT_TEXT_STROKE_WIDTH
public static final double DEFAULT_TEXT_SHADOW_BLUR
public DataLabelsOptions()
DataLabelsPlugin.ID
plugin options.public DataLabelsOptions(IsChart chart)
DataLabelsPlugin.ID
plugin options, relating to chart instance for default.chart
- chart instance related to the plugin optionsprotected void applyingDefaults()
AbstractPluginOptions
applyingDefaults
in class LabelItem
public Labels getLabels()
public IsDefaultFont getFont()
public IsDefaultPadding getPadding()
public org.pepstock.charba.client.datalabels.IsDefaultListeners getListeners()
public Align getAlign()
public Anchor getAnchor()
public String getBackgroundColorAsString()
null
, it uses the background color of dataset.public String getBorderColorAsString()
null
, it uses the border color of dataset.public double getBorderRadius()
public int getBorderWidth()
public boolean isClamp()
true
to enforce the anchor position to be calculated based on the visible geometry of the associated element (i.e. part inside the chart area).true
to enforce the anchor position to be calculated based on the visible geometry of the associated element (i.e. part inside the chart area).public boolean isClip()
true
, the part of the label which is outside the chart area will be masked.true
, the part of the label which is outside the chart area will be masked.public String getColorAsString()
public Display getDisplay()
public int getOffset()
public double getOpacity()
public double getRotation()
public TextAlign getTextAlign()
public String getTextStrokeColorAsString()
public int getTextStrokeWidth()
public double getTextShadowBlur()
public String getTextShadowColorAsString()
public ColorCallback<DataLabelsContext> getBackgroundColorCallback()
public ColorCallback<DataLabelsContext> getBorderColorCallback()
public ColorCallback<DataLabelsContext> getColorCallback()
public FormatterCallback getFormatterCallback()
public AlignCallback getAlignCallback()
public AnchorCallback getAnchorCallback()
public RadiusCallback<DataLabelsContext> getBorderRadiusCallback()
public WidthCallback<DataLabelsContext> getBorderWidthCallback()
public ClampCallback getClampCallback()
public ClipCallback getClipCallback()
public DisplayCallback getDisplayCallback()
public OffsetCallback<DataLabelsContext> getOffsetCallback()
public OpacityCallback getOpacityCallback()
public RotationCallback<DataLabelsContext> getRotationCallback()
public TextAlignCallback<DataLabelsContext> getTextAlignCallback()
public ColorCallback<DataLabelsContext> getTextStrokeColorCallback()
public WidthCallback<DataLabelsContext> getTextStrokeWidthCallback()
public TextShadowBlurCallback getTextShadowBlurCallback()
public ColorCallback<DataLabelsContext> getTextShadowColorCallback()
public FontCallback<DataLabelsContext> getFontCallback()
public PaddingCallback<DataLabelsContext> getPaddingCallback()