Class AbstractDataLabels
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.AbstractDataLabels
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DataLabels,DataLabelsFunnel,DataLabelsRange
public abstract class AbstractDataLabels extends AbstractConfigurationObject
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringOVERFLOW_JUSTIFYstatic StringOVERFLOW_NONE
-
Constructor Summary
Constructors Constructor Description AbstractDataLabels()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract ColorgetBackgroundColor()abstract ColorgetBorderColor()abstract NumbergetBorderRadius()abstract NumbergetBorderWidth()abstract StringgetClassName()abstract ColorgetColor()abstract BooleangetCrop()abstract BooleangetDefer()abstract BooleangetEnabled()abstract StringgetFormat()abstract StringgetFormatter()abstract BooleangetInside()abstract StringgetOverflow()abstract NumbergetPadding()abstract NumbergetRotation()abstract BooleangetShadow()abstract ShapegetShape()abstract StylegetStyle()abstract BooleangetUseHTML()abstract VerticalAligngetVerticalAlign()abstract NumbergetZIndex()abstract voidsetBackgroundColor(Color backgroundColor)The background color or gradient for the data label.abstract voidsetBorderColor(Color borderColor)The border color for the data label.abstract voidsetBorderRadius(Number borderRadius)The border radius in pixels for the data label.abstract voidsetBorderWidth(Number borderWidth)The border width in pixels for the data label.abstract voidsetClassName(String className)A class name for the data label.abstract voidsetColor(Color color)The text color for the data labels.abstract voidsetCrop(Boolean crop)Whether to hide data labels that are outside the plot area.abstract voidsetDefer(Boolean defer)Whether to defer displaying the data labels until the initial series animation has finished.abstract voidsetEnabled(Boolean enabled)Enable or disable the data labels.abstract voidsetFormat(String format)A format string for the data label.abstract voidsetFormatter(String _fn_formatter)Callback JavaScript function to format the data label.abstract voidsetInside(Boolean inside)For points with an extent, like columns, whether to align the data label inside the box or to the actual value point.abstract voidsetOverflow(String overflow)How to handle data labels that flow outside the plot area.abstract voidsetPadding(Number padding)When either theborderWidthor thebackgroundColoris set, this is the padding within the box.abstract voidsetRotation(Number rotation)Text rotation in degrees.abstract voidsetShadow(Boolean shadow)The shadow of the box.abstract voidsetShape(Shape shape)The name of a symbol to use for the border around the label.abstract voidsetStyle(Style style)Styles for the label.abstract voidsetUseHTML(Boolean useHTML)Whether to use HTML to render the labels.abstract voidsetVerticalAlign(VerticalAlign verticalAlign)The vertical alignment of a data label.abstract voidsetZIndex(Number zIndex)The Z index of the data labels.
-
-
-
Field Detail
-
OVERFLOW_JUSTIFY
public static final String OVERFLOW_JUSTIFY
- See Also:
- Constant Field Values
-
OVERFLOW_NONE
public static final String OVERFLOW_NONE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getClassName
public abstract String getClassName()
- See Also:
setClassName(String)
-
setClassName
public abstract void setClassName(String className)
A class name for the data label.
-
getBackgroundColor
public abstract Color getBackgroundColor()
- See Also:
setBackgroundColor(Color)
-
setBackgroundColor
public abstract void setBackgroundColor(Color backgroundColor)
The background color or gradient for the data label.
-
getBorderColor
public abstract Color getBorderColor()
- See Also:
setBorderColor(Color)
-
setBorderColor
public abstract void setBorderColor(Color borderColor)
The border color for the data label.
-
getBorderRadius
public abstract Number getBorderRadius()
- See Also:
setBorderRadius(Number)
-
setBorderRadius
public abstract void setBorderRadius(Number borderRadius)
The border radius in pixels for the data label.
-
getColor
public abstract Color getColor()
- See Also:
setColor(Color)
-
setColor
public abstract void setColor(Color color)
The text color for the data labels.
-
getBorderWidth
public abstract Number getBorderWidth()
- See Also:
setBorderWidth(Number)
-
setBorderWidth
public abstract void setBorderWidth(Number borderWidth)
The border width in pixels for the data label.
-
getCrop
public abstract Boolean getCrop()
- See Also:
setCrop(Boolean)
-
setCrop
public abstract void setCrop(Boolean crop)
Whether to hide data labels that are outside the plot area. By default, the data label is moved inside the plot area according to the overflow option.
-
getDefer
public abstract Boolean getDefer()
- See Also:
setDefer(Boolean)
-
setDefer
public abstract void setDefer(Boolean defer)
Whether to defer displaying the data labels until the initial series animation has finished.
-
getEnabled
public abstract Boolean getEnabled()
- See Also:
setEnabled(Boolean)
-
setEnabled
public abstract void setEnabled(Boolean enabled)
Enable or disable the data labels.
-
getFormat
public abstract String getFormat()
- See Also:
setFormat(String)
-
setFormat
public abstract void setFormat(String format)
A format string for the data label. Available variables are the same as forformatter.
-
getFormatter
public abstract String getFormatter()
- See Also:
setFormatter(String)
-
setFormatter
public abstract void setFormatter(String _fn_formatter)
Callback JavaScript function to format the data label. Note that if aformatis defined, the format takes precedence and the formatter is ignored.
-
getInside
public abstract Boolean getInside()
- See Also:
setInside(Boolean)
-
setInside
public abstract void setInside(Boolean inside)
For points with an extent, like columns, whether to align the data label inside the box or to the actual value point.
-
getOverflow
public abstract String getOverflow()
- See Also:
setOverflow(String)
-
setOverflow
public abstract void setOverflow(String overflow)
How to handle data labels that flow outside the plot area. The default isjustify, which aligns them inside the plot area. For columns and bars, this means it will be moved inside the bar. To display data labels outside the plot area, setcroptofalseandoverflowto"none".
-
getPadding
public abstract Number getPadding()
- See Also:
setPadding(Number)
-
setPadding
public abstract void setPadding(Number padding)
When either theborderWidthor thebackgroundColoris set, this is the padding within the box.
-
getRotation
public abstract Number getRotation()
- See Also:
setRotation(Number)
-
setRotation
public abstract void setRotation(Number rotation)
Text rotation in degrees. Note that due to a more complex structure, backgrounds, borders and padding will be lost on a rotated data label.
-
getShadow
public abstract Boolean getShadow()
- See Also:
setShadow(Boolean)
-
setShadow
public abstract void setShadow(Boolean shadow)
The shadow of the box.
-
getShape
public abstract Shape getShape()
- See Also:
setShape(Shape)
-
setShape
public abstract void setShape(Shape shape)
The name of a symbol to use for the border around the label. Symbols are predefined functions on the Renderer object.
-
getStyle
public abstract Style getStyle()
- See Also:
setStyle(Style)
-
setStyle
public abstract void setStyle(Style style)
Styles for the label.
-
getUseHTML
public abstract Boolean getUseHTML()
- See Also:
setUseHTML(Boolean)
-
setUseHTML
public abstract void setUseHTML(Boolean useHTML)
Whether to use HTML to render the labels.
-
getVerticalAlign
public abstract VerticalAlign getVerticalAlign()
- See Also:
setVerticalAlign(VerticalAlign)
-
setVerticalAlign
public abstract void setVerticalAlign(VerticalAlign verticalAlign)
The vertical alignment of a data label.
-
getZIndex
public abstract Number getZIndex()
- See Also:
setZIndex(Number)
-
setZIndex
public abstract void setZIndex(Number zIndex)
The Z index of the data labels. The default Z index puts it above the series. Use a Z index of 2 to display it behind the series.
-
-