HighchartsYAxisStackLabelsOptions class
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.
API Docs: https://api.highcharts.com/highcharts/yAxis.stackLabels
- Inheritance
-
- Object
- HighchartsOptionsBase
- HighchartsYAxisStackLabelsOptions
Constructors
- HighchartsYAxisStackLabelsOptions.new({String? align, bool? allowOverlap, HighchartsYAxisStackLabelsAnimationOptions? animation, String? backgroundColor, String? borderColor, double? borderRadius, double? borderWidth, bool? crop, bool? enabled, String? format, dynamic formatter, String? overflow, double? rotation, HighchartsYAxisStackLabelsStyleOptions? style, String? textAlign, bool? useHTML, String? verticalAlign, double? x, double? y})
- 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.
Properties
- align ↔ String?
-
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.getter/setter pair - allowOverlap ↔ bool?
-
Allow the stack labels to overlap.
getter/setter pair
- animation ↔ HighchartsYAxisStackLabelsAnimationOptions?
-
Enable or disable the initial animation when a series is
displayed for the
stackLabels
. The animation can also be set as a configuration object. Please note that this option only applies to the initial animation. For other animations, see chart.animation and the animation parameter under the API methods. The following properties are supported:getter/setter pair - backgroundColor ↔ String?
-
The background color or gradient for the stack label.
getter/setter pair
- borderColor ↔ String?
-
The border color for the stack label. Defaults to
undefined
.getter/setter pair - borderRadius ↔ double?
-
The border radius in pixels for the stack label.
getter/setter pair
- borderWidth ↔ double?
-
The border width in pixels for the stack label.
getter/setter pair
- crop ↔ bool?
-
Whether to hide stack labels that are outside the plot area.
By default, the stack label is moved
inside the plot area according to the
overflow
option.
getter/setter pair
- enabled ↔ bool?
-
Enable or disable the stack total labels.
getter/setter pair
- format ↔ String?
-
A format string for the data label. Available variables are the same
as for
formatter
.getter/setter pair - formatter ↔ dynamic
-
Callback JavaScript function to format the label. The value is
given by
this.total
.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- overflow ↔ String?
-
How to handle stack total labels that flow outside the plot area.
The default is set to
"justify"
, which aligns them inside the plot area. For columns and bars, this means it will be moved inside the bar. To display stack labels outside the plot area, setcrop
tofalse
andoverflow
to"allow"
.getter/setter pair - rotation ↔ double?
-
Rotation of the labels in degrees.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style ↔ HighchartsYAxisStackLabelsStyleOptions?
-
CSS styles for the label.
getter/setter pair
- textAlign ↔ String?
-
The text alignment for the label. While
align
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.getter/setter pair - useHTML ↔ bool?
-
Whether to use HTML
to render the labels.
getter/setter pair
- verticalAlign ↔ String?
-
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.getter/setter pair - x ↔ double?
-
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.
getter/setter pair
- y ↔ double?
-
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.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJSON(
) → String -
Serializes the settings to a JSON string.
inherited
-
toOptionsJSON(
StringBuffer buffer) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited