sliceParameterFor
Returns the parameter a mark's slice: binding is read against, or null when none matches.
@internote/canvas-sdkOn this page
import { sliceParameterFor } from '@internote/canvas-sdk';A mark names the column, never the parameter. So the match is by column where one can be made, and by there being a single bound parameter where the mark's column and the control's are written differently: #pop.year for the marks and #calendar.year for the scrubber is one axis spelled twice.
#Signature
(parameters: Parameter[], sliceBinding: unknown): Parameter | null#Parameters
parametersThe scene's parameters,
ctx.parameters.all.sliceBindingThe mark's
slice: value.#Example
const parameter = sliceParameterFor(ctx.parameters.all, attrs.slice);
const at = parameter ? ctx.parameters.values()[parameter.parameter] : undefined;Declared in packages/canvas-sdk/src/parameters/index.ts:457.