discreteAxis
Returns the discrete numeric axis for a set of values: sorted ascending, duplicates dropped, each stop named by the number it is.
@internote/canvas-sdkOn this page
import { discreteAxis } from '@internote/canvas-sdk';The names are the canonical string forms, so everything that reads an axis by name goes on working. The caller decides the ticks; a graph prints them through its own numeric formatter.
#Signature
(values: number[], ticks?: string[]): CategoricalAxis#Parameters
valuesThe numbers the axis holds.
ticksWhat each tick writes. Absent writes the number itself.
Declared in packages/canvas-sdk/src/data/categories.ts:120.