Skip to content

Class: Axis

Defined in: axes/axis.ts:11

Owns the tick configuration for one axis and resolves the final tick list against a scale. Modes: auto (delegates to the scale), custom (array), or generator (function of the range) — plus major/minor, per-tick labels, and addTicks layering.

Constructors

Constructor

ts
new Axis(config?): Axis;

Defined in: axes/axis.ts:23

Parameters

ParameterType
configAxisConfig

Returns

Axis

Properties

config

ts
config: AxisConfig;

Defined in: axes/axis.ts:12

Methods

resolve()

ts
resolve(scale): Tick[];

Defined in: axes/axis.ts:33

Resolve the concrete tick list (labels filled) for the scale's domain.

Parameters

ParameterType
scaleScale

Returns

Tick[]


update()

ts
update(patch): void;

Defined in: axes/axis.ts:27

Parameters

ParameterType
patchPartial<AxisConfig>

Returns

void

MIT licensed. WebGL2 required.