Skip to main content

Interface: TreemapOptions

Defined in: src/mobjects/graphing/Treemap.ts:26

Options for Treemap.

Properties​

colorBy?​

optional colorBy: TreemapColorBy

Defined in: src/mobjects/graphing/Treemap.ts:38

Whether a color is chosen by top-level category or by depth. Default: 'category'.


colors?​

optional colors: string | string[]

Defined in: src/mobjects/graphing/Treemap.ts:36

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


data​

data: TreemapNode

Defined in: src/mobjects/graphing/Treemap.ts:28

The root of the value hierarchy.


fillOpacity?​

optional fillOpacity: number

Defined in: src/mobjects/graphing/Treemap.ts:40

Fill opacity of the tiles. Default: 0.85.


height?​

optional height: number

Defined in: src/mobjects/graphing/Treemap.ts:32

Height of the chart region. Default: 4.5.


labelFontSize?​

optional labelFontSize: number

Defined in: src/mobjects/graphing/Treemap.ts:52

Font size for tile labels. Default: 18.


minLabelSize?​

optional minLabelSize: number

Defined in: src/mobjects/graphing/Treemap.ts:54

Smallest tile side, in scene units, that still gets a label. Default: 0.6.


padding?​

optional padding: number

Defined in: src/mobjects/graphing/Treemap.ts:34

Inset between a parent tile and its children. Default: 0.06.


showInternalNodes?​

optional showInternalNodes: boolean

Defined in: src/mobjects/graphing/Treemap.ts:48

Whether to draw a rectangle for internal (non-leaf) nodes. Default: true.


showLabels?​

optional showLabels: boolean

Defined in: src/mobjects/graphing/Treemap.ts:50

Whether to label leaf tiles that are large enough. Default: true.


showRoot?​

optional showRoot: boolean

Defined in: src/mobjects/graphing/Treemap.ts:46

Whether to draw the root rectangle. Default: false.


strokeColor?​

optional strokeColor: string

Defined in: src/mobjects/graphing/Treemap.ts:42

Stroke color between tiles. Default: WHITE.


strokeWidth?​

optional strokeWidth: number

Defined in: src/mobjects/graphing/Treemap.ts:44

Stroke width between tiles. Default: 1.


width?​

optional width: number

Defined in: src/mobjects/graphing/Treemap.ts:30

Width of the chart region. Default: 8.