Skip to main content

Interface: StackedBarChartOptions

Defined in: src/mobjects/graphing/StackedBarChart.ts:13

Options for creating a StackedBarChart.

Properties​

axisColor?​

optional axisColor: string

Defined in: src/mobjects/graphing/StackedBarChart.ts:45

Color for the axes and labels. Default: white


categoryGap?​

optional categoryGap: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:21

Gap kept empty on each side of a category slot. Default: 0.2


fillOpacity?​

optional fillOpacity: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:31

Fill opacity for the bars. Default: 0.85


height?​

optional height: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:41

Visual height of the chart area. Default: 5


mode?​

optional mode: BarChartMode

Defined in: src/mobjects/graphing/StackedBarChart.ts:17

'stacked' cumulates series; 'grouped' places them side by side. Default: 'stacked'


seriesColors?​

optional seriesColors: string | string[]

Defined in: src/mobjects/graphing/StackedBarChart.ts:25

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


seriesGap?​

optional seriesGap: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:23

Gap between bars of a group (grouped mode). Default: 0.05


seriesNames?​

optional seriesNames: string[]

Defined in: src/mobjects/graphing/StackedBarChart.ts:27

Series names for the legend. Default: []


showLegend?​

optional showLegend: boolean

Defined in: src/mobjects/graphing/StackedBarChart.ts:29

Whether to draw a legend. Default: false


slotWidth?​

optional slotWidth: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:19

Width of a category slot (stacked) or the full group (grouped). Default: 0.8


strokeWidth?​

optional strokeWidth: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:33

Stroke width for the bar outlines. Default: 1.5


values​

values: number[] | number[][]

Defined in: src/mobjects/graphing/StackedBarChart.ts:15

Values as a 2D array [series][category]. A flat array is treated as one series.


width?​

optional width: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:43

Visual width of the chart area. Default: 8


xLabelFontSize?​

optional xLabelFontSize: number

Defined in: src/mobjects/graphing/StackedBarChart.ts:37

Font size for x-axis labels. Default: 22


xLabels?​

optional xLabels: string[]

Defined in: src/mobjects/graphing/StackedBarChart.ts:35

X-axis labels, one per category. Default: []


yRange?​

optional yRange: [number, number, number]

Defined in: src/mobjects/graphing/StackedBarChart.ts:39

Y-axis range as [min, max, step]. Default: auto-computed