Class StackLabels
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.StackLabels
-
- All Implemented Interfaces:
Serializable
public class StackLabels extends AbstractConfigurationObject
The stack labels show the total value for each bar in a stacked column or bar chart. The label will be placed on top of positive columns and below negative columns. In case of an inverted column chart or a bar chart the label is placed to the right of positive bars and to the left of negative bars.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StackLabels()StackLabels(Boolean enabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HorizontalAligngetAlign()BooleangetEnabled()StringgetFormat()StringgetFormatter()NumbergetRotation()StylegetStyle()StringgetTextAlign()BooleangetUseHTML()VerticalAligngetVerticalAlign()NumbergetX()NumbergetY()voidsetAlign(HorizontalAlign align)Defines the horizontal alignment of the stack total label.voidsetEnabled(Boolean enabled)Enable or disable the stack total labels.voidsetFormat(String format)A format string for the data label.voidsetFormatter(String _fn_formatter)voidsetRotation(Number rotation)Rotation of the labels in degrees.voidsetStyle(Style style)CSS styles for the label.voidsetTextAlign(String textAlign)The text alignment for the label.voidsetUseHTML(Boolean useHTML)Whether to use HTML to render the labels.voidsetVerticalAlign(VerticalAlign verticalAlign)Defines the vertical alignment of the stack total label.voidsetX(Number x)The x position offset of the label relative to the left of the stacked bar.voidsetY(Number y)The y position offset of the label relative to the tick position on the axis.
-
-
-
Constructor Detail
-
StackLabels
public StackLabels()
-
StackLabels
public StackLabels(Boolean enabled)
-
-
Method Detail
-
getAlign
public HorizontalAlign getAlign()
- See Also:
setAlign(HorizontalAlign)
-
setAlign
public void setAlign(HorizontalAlign align)
Defines the horizontal alignment of the stack total label. Can be one of"left","center"or"right". The default value is calculated at runtime and depends on orientation and whether the stack is positive or negative.
-
getEnabled
public Boolean getEnabled()
- See Also:
setEnabled(Boolean)
-
setEnabled
public void setEnabled(Boolean enabled)
Enable or disable the stack total labels.Defaults to: false
-
getFormat
public String getFormat()
- See Also:
setFormat(String)
-
setFormat
public void setFormat(String format)
A format string for the data label. Available variables are the same as forformatter.Defaults to: {total}
-
getFormatter
public String getFormatter()
-
setFormatter
public void setFormatter(String _fn_formatter)
-
getRotation
public Number getRotation()
- See Also:
setRotation(Number)
-
setRotation
public void setRotation(Number rotation)
Rotation of the labels in degrees.Defaults to: 0
-
getStyle
public Style getStyle()
- See Also:
setStyle(Style)
-
setStyle
public void setStyle(Style style)
CSS styles for the label.
In styled mode, the styles are set in the
.highcharts-stack-labelclass.Defaults to: { "color": "#000000", "fontSize": "11px", "fontWeight": "bold", "textShadow": "1px 1px contrast, -1px -1px contrast, -1px 1px contrast, 1px -1px contrast" }
-
getTextAlign
public String getTextAlign()
- See Also:
setTextAlign(String)
-
setTextAlign
public void setTextAlign(String textAlign)
The text alignment for the label. Whilealigndetermines where the texts anchor point is placed with regards to the stack,textAligndetermines how the text is aligned against its anchor point. Possible values are"left","center"and"right". The default value is calculated at runtime and depends on orientation and whether the stack is positive or negative.
-
getUseHTML
public Boolean getUseHTML()
- See Also:
setUseHTML(Boolean)
-
setUseHTML
public void setUseHTML(Boolean useHTML)
Whether to use HTML to render the labels.Defaults to: false
-
getVerticalAlign
public VerticalAlign getVerticalAlign()
- See Also:
setVerticalAlign(VerticalAlign)
-
setVerticalAlign
public void setVerticalAlign(VerticalAlign verticalAlign)
Defines the vertical alignment of the stack total label. Can be one of"top","middle"or"bottom". The default value is calculated at runtime and depends on orientation and whether the stack is positive or negative.
-
getX
public Number getX()
- See Also:
setX(Number)
-
setX
public void setX(Number x)
The x position offset of the label relative to the left of the stacked bar. The default value is calculated at runtime and depends on orientation and whether the stack is positive or negative.
-
getY
public Number getY()
- See Also:
setY(Number)
-
setY
public void setY(Number y)
The y position offset of the label relative to the tick position on the axis. The default value is calculated at runtime and depends on orientation and whether the stack is positive or negative.
-
-