Skip to content

Class: D3PCoordinates ​

Defined in: core/coords.ts:673

Per-chart set of coordinate systems and of the joins between their axes.

A join says that axes of different systems describe the same quantity (a time shown on a cartesian X axis and as the angle of a polar chart, say). The probe (D3PProbe.projectFrom) gives the value an axis should look at for a pointer event, even when the pointer is not over its own system: the tooltip and the cursor follow the pointer across systems that way. Axes with the same name, or sharing one domain, are joined implicitly.

Extends ​

Constructors ​

Constructor ​

ts
new D3PCoordinates(chart): D3PCoordinates;

Defined in: core/coords.ts:679

Parameters ​

chart ​

D3PChart

Returns ​

D3PCoordinates

Overrides ​

D3PObject.constructor

Methods ​

add() ​

ts
add(system): void;

Defined in: core/coords.ts:685

Adds a coordinate system to the chart. Throws an error if another has its name.

Parameters ​

system ​

D3PCoordinateSystem

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


ensure() ​

ts
ensure(name, who?): D3PCoordinateSystem;

Defined in: core/coords.ts:722

The system called name, created with default settings when it is one of the two default systems (cartesian, polar) and nobody registered it. Throws for an unknown custom name.

Parameters ​

name ​

string

who? ​

string = 'a renderer'

Returns ​

D3PCoordinateSystem


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


get() ​

ts
get(name): D3PCoordinateSystem<any> | undefined;

Defined in: core/coords.ts:709

The system of that name, if any.

Parameters ​

name ​

string

Returns ​

D3PCoordinateSystem<any> | undefined


getJoins() ​

ts
getJoins(): readonly D3PJoinGroup[];

Defined in: core/coords.ts:753

The groups of axes that describe the same quantity, declared on this chart.

Returns ​

readonly D3PJoinGroup[]


join() ​

ts
join(spec): () => void;

Defined in: core/coords.ts:743

Declare that these axes (objects or names) describe the same quantity. Returns an undo function.

Parameters ​

spec ​

D3PJoinSpec

Returns ​

() => void


list() ​

ts
list(): D3PCoordinateSystem<any>[];

Defined in: core/coords.ts:714

The coordinate systems of the chart.

Returns ​

D3PCoordinateSystem<any>[]


onDestroy() ​

ts
protected onDestroy(): void;

Defined in: core/coords.ts:757

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

Returns ​

void

Overrides ​

D3PObject.onDestroy


remove() ​

ts
remove(system): void;

Defined in: core/coords.ts:695

Removes a coordinate system from the chart.

Parameters ​

system ​

D3PCoordinateSystem

Returns ​

void


resolve() ​

ts
resolve(axis): D3PCoordinateSystem;

Defined in: core/coords.ts:736

The system of axis (see ensure).

Parameters ​

axis ​

D3PAxis

Returns ​

D3PCoordinateSystem

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/coords.ts:679


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