The alignment of the data label compared to the point. If right
, the right side of the label should be touching the point. For points with an extent, like columns, the alignments also dictates how to align it inside the box, as given with the inside option. Can be one of "left", "center" or "right".
Whether to allow data labels to overlap. To make the labels less sensitive for overlapping, the dataLabels.padding can be set to 0.
The background color or gradient for the data label. Defaults to undefined
.
The border color for the data label. Defaults to undefined
.
The border radius in pixels for the data label.
The border width in pixels for the data label.
A class name for the data label. Particularly in styled mode, this can be used to give each series' or point's data label unique styling. In addition to this option, a default color class name is added so that we can give the labels a contrast text shadow.
The text color for the data labels. Defaults to null
.
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.
Whether to defer displaying the data labels until the initial series animation has finished.
Enable or disable the data labels.
A format string for the data label. Available variables are the same as for formatter
.
Callback JavaScript function to format the data label. Note that if a format
is defined, the format takes precedence and the formatter is ignored. Available data are:.
this.percentage | . Stacked series and pies only. The point's percentage of the total. | .
this.point | . The point object. The point name, if defined, is available . through this.point.name . | .
this.series : | . The series object. The series name is available . through this.series.name . | .
this.total | . Stacked series only. The total value at this point's x value. | .
this.x : | . The x value. | .
this.y : | . The y value. | .
For points with an extent, like columns, whether to align the data label inside the box or to the actual value point. Defaults to false
in most cases, true
in stacked columns.
How to handle data labels that flow outside the plot area. The default is justify
, 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, set crop
to false
and overflow
to "none"
.
When either the borderWidth
or the backgroundColor
is set, this is the padding within the box.
Text rotation in degrees. Note that due to a more complex structure, backgrounds, borders and padding will be lost on a rotated data label.
The shadow of the box. Works best with borderWidth
or backgroundColor
. Since 2.3 the shadow can be an object configuration containing color
, offsetX
, offsetY
, opacity
and width
.
The name of a symbol to use for the border around the label. Symbols are predefined functions on the Renderer object.
Styles for the label. The default color
setting is "contrast"
, which is a pseudo color that Highcharts picks up and applies the maximum contrast to the underlying point item, for example the bar in a bar chart. The textOutline
is a pseudo property that applies an outline of the given width with the given color, which by default is the maximum contrast to the text. So a bright text color will result in a black text outline for maximum readability on a mixed background. In some cases, especially with grayscale text, the text outline doesn't work well, in which cases it can be disabled by setting it to "none"
.
Whether to use HTML to render the labels.
The vertical alignment of a data label. Can be one of top
, middle
or bottom
. The default value depends on the data, for instance in a column chart, the label is above positive values and below negative values.
X offset of the higher data labels relative to the point value.
X offset of the lower data labels relative to the point value.
Y offset of the higher data labels relative to the point value.
Y offset of the lower data labels relative to the point value.
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.