Documentation

@kanunilabs/datagrid-react-enterprise


@kanunilabs/datagrid-react-enterprise / GridChartPanelProps

Interface: GridChartPanelProps<TRow>

Type Parameters

TRow

TRow = GridRowData

Properties

columns

columns: object[]

Columns offered in the pickers, in grid order.

enumerated marks a column that draws from a bounded set (it has a lookup) — the only reliable signal, without counting a million rows, that a column makes a sensible category. isKey marks the row key.

enumerated?

optional enumerated?: boolean

id

id: string

isKey?

optional isKey?: boolean

label

label: string

numeric

numeric: boolean

temporal?

optional temporal?: boolean

A date column — offered calendar grouping, and bucketed by default.


controller

controller: DataGridController<TRow> | null


crossFilter?

optional crossFilter?: boolean

Clicking a category filters the grid by it. Off by default — see §13.


height?

optional height?: number

Fixed canvas height in px. Omit to fill the panel.

Filling relies on recharts' ResizeObserver, which never fires for an element that is display: none — so a chart inside a collapsed accordion or an inactive tab stays blank until it is shown. A fixed height sidesteps the observer and draws immediately.


initialSpec?

optional initialSpec?: Partial<ChartSpec<TRow>>


initialType?

optional initialType?: string

Chart type to open on — a registered renderer's id. Defaults to column.

Separate from initialSpec because the type is a RENDERING choice, not part of the (serializable, worker-bound) chart definition; the panel's own picker changes it afterwards either way. The cell menu's chart submenu uses this to open straight into the type the user picked.


labels?

optional labels?: Partial<GridChartPanelLabels>


locale?

optional locale?: string


onSpecChange?

optional onSpecChange?: (spec) => void

Parameters

spec

ChartSpec<TRow>

Returns

void

Methods

onClose()

onClose(): void

Returns

void