Class StackLabels
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.StackLabels
- All Implemented Interfaces:
Serializable
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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
getStyle()
getX()
getY()
void
setAlign
(HorizontalAlign align) Defines the horizontal alignment of the stack total label.void
setEnabled
(Boolean enabled) Enable or disable the stack total labels.void
A format string for the data label.void
setFormatter
(String _fn_formatter) void
setRotation
(Number rotation) Rotation of the labels in degrees.void
CSS styles for the label.void
setTextAlign
(String textAlign) The text alignment for the label.void
setUseHTML
(Boolean useHTML) Whether to use HTML to render the labels.void
setVerticalAlign
(VerticalAlign verticalAlign) Defines the vertical alignment of the stack total label.void
The x position offset of the label relative to the left of the stacked bar.void
The y position offset of the label relative to the tick position on the axis.
-
Constructor Details
-
StackLabels
public StackLabels() -
StackLabels
-
-
Method Details
-
getAlign
- See Also:
-
setAlign
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
- See Also:
-
setEnabled
Enable or disable the stack total labels.Defaults to: false
-
getFormat
- See Also:
-
setFormat
A format string for the data label. Available variables are the same as forformatter
.Defaults to: {total}
-
getFormatter
-
setFormatter
-
getRotation
- See Also:
-
setRotation
Rotation of the labels in degrees.Defaults to: 0
-
getStyle
- See Also:
-
setStyle
CSS styles for the label.
In styled mode, the styles are set in the
.highcharts-stack-label
class.Defaults to: { "color": "#000000", "fontSize": "11px", "fontWeight": "bold", "textShadow": "1px 1px contrast, -1px -1px contrast, -1px 1px contrast, 1px -1px contrast" }
-
getTextAlign
- See Also:
-
setTextAlign
The text alignment for the label. Whilealign
determines where the texts anchor point is placed with regards to the stack,textAlign
determines 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
- See Also:
-
setUseHTML
Whether to use HTML to render the labels.Defaults to: false
-
getVerticalAlign
- See Also:
-
setVerticalAlign
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
- See Also:
-
setX
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
- See Also:
-
setY
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.
-