ChartStackLabelsProps

Defines the configuration options for stack labels in a chart.

Props

The following table outlines the props for the ChartStackLabelsProps:

NameTypeDefaultDescription
align
'Center'

Determines the alignment of the text within its container. Available options:

  • Left: Aligns the text to the left.
  • Center: Aligns the text to the center.
  • Right: Aligns the text to the right.
border
{ color: 'transparent', width: 0 }

Customizes the border appearance of the stack labels.

borderRadius
{ rx: 0, ry: 0 }

Defines the border radius configuration for the stack label background. Controls the curvature of corners for both horizontal and vertical axes.

fill
string
'transparent'

Sets the background color of the stack labels. Accepts valid CSS color values such as hex codes or RGBA.

font
{ fontStyle: 'Normal', fontSize: '12px', fontWeight: 'Normal', color: '', fontFamily: '' }

Defines the font styling for the stack label text.

format
string | null
null

Custom format string for the stack label text. Supports placeholders such as {value}, where {value} represents the total stack value.

margin
{ left: 0, right: 0, top: 0, bottom: 0 }

Configures the margin around the stack label.

rotationAngle
number
0

Specifies the rotation angle of the stack labels in degrees.

visible
boolean
false

When set to true, stack labels are displayed on the chart.