resolveCategoricalColumn

Returns the column a binding names as positions on a categorical axis, or null if the value is not a column binding.

@internote/canvas-sdkFunction
On this page
import { resolveCategoricalColumn } from '@internote/canvas-sdk';

Each cell is looked up among the axis's names, NaN where the axis has no such name. Row-aligned like the numeric reading, for the same reason.

#Signature

(
    datasets: Record<string, ChalkDataset> | undefined,
    value: unknown,
    axis: CategoricalAxis,
): number[] | null

#Parameters

datasets
The document's datasets.
value
An attribute value that may be a #id.column binding.
axis
The axis to place the cells on.

Declared in packages/canvas-sdk/src/data/resolve-column.ts:134.

Last updated