Skip to main content

Interface: DonutChartOptions

Defined in: src/mobjects/graphing/PieChart.ts:379

Options for DonutChart. Adds the hole radius to PieChartOptions.

Extends​

Properties​

colors?​

optional colors: string | string[]

Defined in: src/mobjects/graphing/PieChart.ts:94

Slice colors. Single color applies to all, array cycles. Default: Manim palette.

Inherited from​

PieChartOptions.colors


fillOpacity?​

optional fillOpacity: number

Defined in: src/mobjects/graphing/PieChart.ts:100

Fill opacity of the slices. Default: 0.8.

Inherited from​

PieChartOptions.fillOpacity


innerRadius?​

optional innerRadius: number

Defined in: src/mobjects/graphing/PieChart.ts:384

Hole radius as a fraction of the outer radius, in [0, 1). Default: 0.5. A value of 0 makes a full pie.


labelFontSize?​

optional labelFontSize: number

Defined in: src/mobjects/graphing/PieChart.ts:110

Font size for slice labels. Default: 24.

Inherited from​

PieChartOptions.labelFontSize


labelPosition?​

optional labelPosition: LabelPosition

Defined in: src/mobjects/graphing/PieChart.ts:112

Place labels 'inside' the slices or 'outside' the rim. Default: 'outside'.

Inherited from​

PieChartOptions.labelPosition


labels?​

optional labels: string[]

Defined in: src/mobjects/graphing/PieChart.ts:92

Text label for each value (by original index). Default: [].

Inherited from​

PieChartOptions.labels


legendFontSize?​

optional legendFontSize: number

Defined in: src/mobjects/graphing/PieChart.ts:116

Font size for legend labels. Default: 18.

Inherited from​

PieChartOptions.legendFontSize


radius?​

optional radius: number

Defined in: src/mobjects/graphing/PieChart.ts:98

Outer radius of the chart. Default: 2.

Inherited from​

PieChartOptions.radius


showLabels?​

optional showLabels: boolean

Defined in: src/mobjects/graphing/PieChart.ts:106

Whether to draw text labels on the slices. Default: true when labels are given.

Inherited from​

PieChartOptions.showLabels


showLegend?​

optional showLegend: boolean

Defined in: src/mobjects/graphing/PieChart.ts:114

Whether to draw a legend of label swatches. Default: false.

Inherited from​

PieChartOptions.showLegend


showPercentages?​

optional showPercentages: boolean

Defined in: src/mobjects/graphing/PieChart.ts:108

Whether to append the percentage to each label. Default: false.

Inherited from​

PieChartOptions.showPercentages


startAngle?​

optional startAngle: number

Defined in: src/mobjects/graphing/PieChart.ts:96

Angle of the first slice edge, in radians. Default: Math.PI / 2 (12 o'clock).

Inherited from​

PieChartOptions.startAngle


strokeColor?​

optional strokeColor: string

Defined in: src/mobjects/graphing/PieChart.ts:102

Stroke color drawn between slices. Default: WHITE.

Inherited from​

PieChartOptions.strokeColor


strokeWidth?​

optional strokeWidth: number

Defined in: src/mobjects/graphing/PieChart.ts:104

Stroke width drawn between slices. Default: 2.

Inherited from​

PieChartOptions.strokeWidth


values​

values: number[]

Defined in: src/mobjects/graphing/PieChart.ts:90

Data values. One slice per positive value. Default: required.

Inherited from​

PieChartOptions.values