Data
Datasets as an environment reads them: a column resolved to numbers, dates, slices or categories, the axis presets over them, and a series entry.
@internote/canvas-sdkOn this page
An author attaches datasets to a document and binds an attribute to a column. The environment reads them through ctx.datasets.
A column arrives as text. These read a bound column as values:
resolveNumericColumnreads it as numbers.resolveCategoricalColumnreads it as positions on a categorical axis.resolveSliceColumnreads dates, months, weekdays and times as numbers a control can step through.datasetColumnKindsays which kind of column it is.
resolveNumber and resolveInterval evaluate a value that may be a number, a date or an expression, at the current parameter values.
For long-format data — one row per thing per slice — buildSlicedSeries groups a key, a slice and a value column into a SlicedSeries, and seriesAt reads it at one slice, blending between the two either side. Where the slice column holds NAMES there is nothing to blend, so namedSliceOf selects the rows carrying the chosen name and namedStopsOf lists the names a control may offer.