Skip to content

Documentation / @ripl/charts / TreemapChartOptions

Interface: TreemapChartOptions<TData> ​

Defined in: charts/src/charts/treemap.ts:73

Options for configuring a TreemapChart.

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
borderRadius?numberCorner radius in pixels applied to each cell. Defaults to 4.-charts/src/charts/treemap.ts:89
colorBy?keyof TData | ((item) => string)Optional per-item color accessor; falls back to a generated palette color.-charts/src/charts/treemap.ts:83
dataTData[]The dataset to render, one cell per item.-charts/src/charts/treemap.ts:75
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 cell values shown as text (e.g. tooltips).-charts/src/charts/treemap.ts:91
gap?numberGap in pixels between adjacent cells. Defaults to 3.-charts/src/charts/treemap.ts:87
keykeyof TData | ((item) => string)Accessor for each item's unique key, used to match cells across data updates.-charts/src/charts/treemap.ts:77
labelkeyof TData | ((item) => string)Accessor for each item's display label (shown inside sufficiently large cells).-charts/src/charts/treemap.ts:81
legend?ChartLegendInputLegend configuration. Shown by default; pass false to hide.-charts/src/charts/treemap.ts:85
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
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 cell area.-charts/src/charts/treemap.ts:79