Documentation

@kanunilabs/datagrid-react-enterprise


@kanunilabs/datagrid-react-enterprise / ChartRenderContext

Interface: ChartRenderContext

Properties

blankLabel

blankLabel: string

What a blank category is called, in the grid's language.


colors

colors: string[]

Per-series colours, already resolved — index-aligned with model.series.


hidden

hidden: ReadonlySet<number>

Series the user hid via the legend; renderers must skip these.


locale

locale: string

BCP-47 tag for number formatting.


onCategoryClick?

optional onCategoryClick?: (category, index) => void

Set when cross-filtering is enabled; a click on a category calls it.

Parameters

category

string

index

number

Returns

void


rightAxis

rightAxis: ReadonlySet<number>

Series indices that belong on a SECOND, right-hand value axis.

Revenue summed over a million rows is ~2×10⁸; units summed over the same rows is ~2×10⁶. Plotted against one axis the second series is a hundredth of the first and draws as a flat line on the baseline — present in the legend, invisible in the chart. The panel decides the split; renderers just honour it.


size

size: { height: number; width: number; } | null

Explicit canvas size in px, or null to fill the container.

Filling is the default and uses recharts' ResponsiveContainer, which sizes itself from a ResizeObserver — so it draws NOTHING until one fires. An element that starts display: none (a chart in a collapsed accordion or an inactive tab) therefore renders empty until it is shown. Passing a size skips the observer entirely, which is what a fixed-height dock wants.

Methods

formatValue()

formatValue(value): string

Parameters

value

number

Returns

string


onToggleSeries()

onToggleSeries(index): void

Parameters

index

number

Returns

void