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 map areas, 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
. Note that data labels in Highmaps by default have a style.HcTextStroke
in order to make the text readable against any background. When the color is changed, it is also recommended to change this.
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.
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.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 . | .
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
. The shadow can also 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 area in a map. 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 x position offset of the label relative to the point.
The y position offset of the label relative to the point.
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.