Skip to main content

Interface: PieChartOptions

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

Options shared by PieChart and DonutChart.

Extended by​

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.


fillOpacity?​

optional fillOpacity: number

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

Fill opacity of the slices. Default: 0.8.


labelFontSize?​

optional labelFontSize: number

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

Font size for slice labels. Default: 24.


labelPosition?​

optional labelPosition: LabelPosition

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

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


labels?​

optional labels: string[]

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

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


legendFontSize?​

optional legendFontSize: number

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

Font size for legend labels. Default: 18.


radius?​

optional radius: number

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

Outer radius of the chart. Default: 2.


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.


showLegend?​

optional showLegend: boolean

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

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


showPercentages?​

optional showPercentages: boolean

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

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


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).


strokeColor?​

optional strokeColor: string

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

Stroke color drawn between slices. Default: WHITE.


strokeWidth?​

optional strokeWidth: number

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

Stroke width drawn between slices. Default: 2.


values​

values: number[]

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

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