Edit this page

seriesDefaults.labels Object

Configures the series data labels.

seriesDefaults.labels.background String

The background color of the labels. Any valid CSS color string will work here, including hex and rgb.

seriesDefaults.labels.border Object

The border of the labels.

seriesDefaults.labels.border.color String(default: "black")

The color of the border.

seriesDefaults.labels.border.dashType String(default: "solid")

The dash type of the border.

"solid"

Specifies a solid line.

"dot"

Specifies a line consisting of dots.

"dash"

Specifies a line consisting of dashes.

"longDash"

Specifies a line consisting of a repeating pattern of long-dash.

"dashDot"

Specifies a line consisting of a repeating pattern of dash-dot.

"longDashDot"

Specifies a line consisting of a repeating pattern of long-dash-dot.

"longDashDotDot"

Specifies a line consisting of a repeating pattern of long-dash-dot-dot.

seriesDefaults.labels.border.width Number(default: 0)

The width of the border.

seriesDefaults.labels.color String

The text color of the labels. Any valid CSS color string will work here, including hex and rgb.

seriesDefaults.labels.font String(default: "12px Arial,Helvetica,sans-serif")

The font style of the labels. labels

seriesDefaults.labels.format String

The format of the labels.

Example

//sets format of the labels
format: "C"

seriesDefaults.labels.margin Number |Object(default: 0)

The margin of the labels.

seriesDefaults.labels.padding Number |Object(default: 0)

The padding of the labels.

Example

// sets the top, right, bottom and left padding to 3px.
padding: 3

// sets the top and left padding to 1px
// padding right and bottom are with 0px (by default)
padding: { top: 1, left: 1 }

seriesDefaults.labels.template String | Function

The label template. Template variables:

  • value- the point value
  • category- the category name
  • series- the data series
  • dataItem- the original data item used to construct the point. Will be null if binding to array.

seriesDefaults.labels.visible Boolean(default: false)

The visibility of the labels.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy