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-sdkFunction
On 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

values
The numbers the axis holds.
ticks
What each tick writes. Absent writes the number itself.

Declared in packages/canvas-sdk/src/data/categories.ts:120.

Last updated