Skip to content

Class: D3PAxisManager ​

Defined in: core/axis-manager.ts:24

Per-chart registry of axes. Names are unique within a chart (across X and Y), since mapped mouse coordinates are keyed by axis name.

Extends ​

Constructors ​

Constructor ​

ts
new D3PAxisManager(chart): D3PAxisManager;

Defined in: core/axis-manager.ts:29

Parameters ​

chart ​

D3PChart

Returns ​

D3PAxisManager

Overrides ​

D3PObject.constructor

Methods ​

add() ​

ts
add(axis): void;

Defined in: core/axis-manager.ts:35

Adds an axis to the chart. Throws an error if another axis already has its name.

Parameters ​

axis ​

D3PAxis

Returns ​

void


destroy() ​

ts
destroy(): void;

Defined in: core/object.ts:51

Detaches the object from all its charts, announces destroyed and releases its subscriptions. The object cannot be used afterwards.

Returns ​

void

Inherited from ​

D3PObject.destroy


fire() ​

ts
protected fire<P>(event, ...args): void;

Defined in: core/object.ts:41

Emits one of its own events on the bus.

Type Parameters ​

P ​

P

Parameters ​

event ​

D3PEvent<P>

args ​

...P extends void ? [] : [payload: P]

Returns ​

void

Inherited from ​

D3PObject.fire


getAxesState() ​

ts
getAxesState(filter?): D3PAxesState;

Defined in: core/axis-manager.ts:60

Axes retained by filter (identity or name); no filter = everything.

Parameters ​

filter? ​

D3PAxisFilter

Returns ​

D3PAxesState


getXAxes() ​

ts
getXAxes(): D3PAxis[];

Defined in: core/axis-manager.ts:66

The X axes (angle axes in polar), in the order they were added.

Returns ​

D3PAxis[]


getXAxis() ​

ts
getXAxis(name): D3PAxis | undefined;

Defined in: core/axis-manager.ts:74

The X axis of that name, if any.

Parameters ​

name ​

string

Returns ​

D3PAxis | undefined


getYAxes() ​

ts
getYAxes(): D3PAxis[];

Defined in: core/axis-manager.ts:70

The Y axes (radius axes in polar), in the order they were added.

Returns ​

D3PAxis[]


getYAxis() ​

ts
getYAxis(name): D3PAxis | undefined;

Defined in: core/axis-manager.ts:78

The Y axis of that name, if any.

Parameters ​

name ​

string

Returns ​

D3PAxis | undefined


onDestroy() ​

ts
protected onDestroy(): void;

Defined in: core/object.ts:46

Hook run first on destroy (detach from partners, release DOM...).

Returns ​

void

Inherited from ​

D3PObject.onDestroy


remove() ​

ts
remove(axis): void;

Defined in: core/axis-manager.ts:45

Removes an axis from the chart.

Parameters ​

axis ​

D3PAxis

Returns ​

void

Properties ​

bus ​

ts
readonly bus: D3PBus;

Defined in: core/object.ts:27

The bus the object uses for its events.

Inherited from ​

D3PObject.bus


chart ​

ts
readonly chart: D3PChart;

Defined in: core/axis-manager.ts:29


e ​

ts
readonly e: D3PEventTable<M & object>;

Defined in: core/object.ts:29

The events of the object, by name: destroyed for all, and its own (axis.e.scaleChanged).

Inherited from ​

D3PObject.e


isDestroying ​

ts
isDestroying: boolean = false;

Defined in: core/object.ts:31

Set when destroy starts: the object is not drawn after that.

Inherited from ​

D3PObject.isDestroying


subs ​

ts
protected readonly subs: D3PSubscriptions;

Defined in: core/object.ts:33

The subscriptions of the object, released when it is destroyed.

Inherited from ​

D3PObject.subs