This class provides options to customize the appearance and behavior of data labels within a series.
Specifies the alignment of the data label relative to the data point. The available options are:
Defaults to ‘Center’
number
Specifies the rotation angle of the data label.
Defaults to 0
Configures the appearance of the border lines with options for width and color properties.
boolean
If set to true, the data label will be rotated according to the specified angle.
Defaults to false
string
The background color of the data label accepts hex and rgba values as valid CSS color strings.
Defaults to ‘transparent’
Customizes the appearance of the data label text with options for font size, color, style, weight, and family.
string
Used to format the data label, accepting global string formats like C
, n1
, P
, etc.
It also supports placeholders, such as {value}°C
, where {value}
represent the point data label (e.g., 20°C).
Defaults to null
Specifies the action to handle overlapping data labels. Available options include:
Defaults to ‘Hide’
Configures the margin for the data label.
string
Specifies the data source field that contains the data label value.
Defaults to null
number
Specifies the opacity level for the data label background, which controls its transparency.
Defaults to 1
Specifies the position of the data label relative to the data point. The available options are:
Defaults to ‘Auto’
number
Specifies the X-axis rounded corner radius for the data label.
Note that
border
values must not be null for this feature to work.
Defaults to 5
number
Specifies the Y-axis rounded corner radius for the data label.
Note that
border
values must not be null for this feature to work.
Defaults to 5
boolean
If set to true, data labels for zero values in the series are render.
Defaults to true
string
| Function
Custom template for the data label.
Use ${point.x}
and ${point.y}
as placeholders to display the corresponding data point values.
Defaults to null
boolean
If set to true, data labels for the series are render. By default, it is set to false.
Defaults to false