namedSliceOf

Returns the indices of the rows whose cell in a slice column of names equals a name, or null when the column does not resolve.

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

The categorical half of the pair: no interpolation and no grouping. Cells are compared trimmed. An empty selection is an empty array, since the column resolved and simply holds no such name.

#Signature

(
    datasets: Record<string, ChalkDataset> | undefined,
    sliceBinding: unknown,
    name: string,
): number[] | null

#Parameters

datasets
The document's datasets.
sliceBinding
The binding of the column naming each slice.
name
The name the parameter holds.

Declared in packages/canvas-sdk/src/data/sliced-series.ts:95.

Last updated