PieChartTitleProps

Defines configuration options for the chart's title, including styling, positioning, and accessibility features.

Props

The following table outlines the props for the PieChartTitleProps:

NameTypeDefaultDescription
accessibility
{ ariaLabel: null, focusable: true, role: null, tabIndex: 0 }

Provides customization options to enhance accessibility for the chart title.

align
Center

Determines the alignment of the title 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.
background
string
transparent

The background color of the chart title area. Accepts any valid CSS color value.

border
{ color: '', width: 1, dashArray: '' }

Defines the border styling for the chart title area.

font
{ color: '', fontFamily: '', fontSize: '', fontStyle: '', fontWeight: '', opacity: 1 }

Defines the font and color styling for the title. This includes properties like font family, size, weight, and color, allowing the text to match the chart's overall aesthetic or to be emphasized.

position
Top

Determines the position of the chart title relative to the chart area. Available options:

  • Top: Displays the title above the chart.
  • Left: Displays the title to the left of the chart.
  • Bottom: Displays the title below the chart.
  • Right: Displays the title to the right of the chart.
  • Custom: Allows manual positioning using x and y coordinates.
text
string
''

Specifies the main title text of the chart. This text provides context or a label for the chart's data.

textOverflow
Wrap

Controls how the title behaves when it overflows its container. Available options:

  • Wrap: Wraps the text to the next line.
  • Trim: Trims the overflowed text.
  • None: Displays the text even if it overlaps other elements.
x
number
0

X-coordinate for positioning the chart title. Only applicable when position is set to Custom.

y
number
0

Y-coordinate for positioning the chart title.Only applicable when position is set to Custom.