Skip to content

Documentation / @ripl/charts / PieChartOptions

Interface: PieChartOptions<TData> ​

Defined in: charts/src/charts/pie.ts:94

Options for configuring a PieChart.

Extends ​

Type Parameters ​

Type ParameterDefault type
TDataunknown

Properties ​

PropertyTypeDescriptionInherited fromDefined in
animation?boolean | Partial<ChartAnimationOptions>Animation configuration, or a boolean toggling all transitions. See ChartAnimationOptions.BaseChartOptions.animationcharts/src/core/chart.ts:128
autoRender?booleanWhether the chart renders automatically on construction and after every Chart.update. Defaults to true.BaseChartOptions.autoRendercharts/src/core/chart.ts:122
colorBy?keyof TData | ((item) => string)Optional accessor for a per-item color override (otherwise a palette color is generated).-charts/src/charts/pie.ts:104
dataTData[]The dataset to render, one segment per item.-charts/src/charts/pie.ts:96
description?stringAccessible description announced by screen readers (sets the rendering element's ARIA label). Defaults to the title text.BaseChartOptions.descriptioncharts/src/core/chart.ts:132
format?ValueFormatInputFormat applied to segment values shown as text (e.g. tooltips).-charts/src/charts/pie.ts:118
innerRadius?numberInner hole radius (donut). A value <= 1 is a fraction of the outer radius; larger values are absolute pixels. Defaults to 0 (a solid pie).-charts/src/charts/pie.ts:106
keykeyof TData | ((item) => string)Accessor for each item's unique key, used to match segments across data updates.-charts/src/charts/pie.ts:98
labelkeyof TData | ((item) => string)Accessor for each item's display label (shown in the legend and segment labels).-charts/src/charts/pie.ts:102
labels?ChartSegmentLabelsInputSegment labels. Hidden by default (the legend is shown by default). true shows labels inside each segment; 'outside' places them beyond the arc with a leader line; a full object customizes position/font/color.-charts/src/charts/pie.ts:116
legend?ChartLegendInputLegend configuration. Shown by default; pass false to hide.-charts/src/charts/pie.ts:110
padding?PaddingInputSpace reserved around the chart, in pixels. A single number applies to all four edges; a [top, right, bottom, left] tuple or a partial { top, right, bottom, left } object sets individual edges, leaving unspecified edges at the default. Defaults to 16.BaseChartOptions.paddingcharts/src/core/chart.ts:124
padWidth?numberGap between adjacent segments, in logical pixels. Segments face each other with parallel edges a constant distance apart, rather than a wedge that widens with radius. Defaults to 2; pass 0 for touching segments.-charts/src/charts/pie.ts:108
theme?string | ThemeTheme for this chart: a registered name ('light'/'dark'/'auto'), or a Theme. Falls back to the module default (see setDefaultTheme).BaseChartOptions.themecharts/src/core/chart.ts:130
title?string | Partial<ChartTitleOptions>Chart title as plain text, or a ChartTitleOptions object for full control.BaseChartOptions.titlecharts/src/core/chart.ts:126
valueNumericAccessor<TData>Accessor for each item's numeric value, which determines its proportional arc angle.-charts/src/charts/pie.ts:100