Skip to content

Class: D3PStack ​

Defined in: core/transforms.ts:94

Stacks series on top of each other. stack.series[i] is the layer of input i, with the columns x, y (top of the layer), y0 (its base) and value (the original value, which the tooltip shows). Areas and bars draw between y0 and y by themselves; lines draw the top. Link the layers to an auto domain: its domain then covers y0 and y, not the raw values.

Extends ​

  • D3PTransform

Constructors ​

Constructor ​

ts
new D3PStack(opts): D3PStack;

Defined in: core/transforms.ts:104

Parameters ​

opts ​

D3PStackOptions

Returns ​

D3PStack

Overrides ​

D3PTransform.constructor

Methods ​

compute() ​

ts
protected compute(): void;

Defined in: core/transforms.ts:121

Stacks the inputs: y0 and y of each layer follow the offset and the order.

Returns ​

void

Overrides ​

D3PTransform.compute


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 ​

D3PTransform.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 ​

D3PTransform.fire


onDestroy() ​

ts
protected onDestroy(): void;

Defined in: core/transforms.ts:137

Stops listening to the inputs and destroys the layers.

Returns ​

void

Overrides ​

D3PTransform.onDestroy


refresh() ​

ts
protected refresh(): void;

Defined in: core/transforms.ts:32

Computes again, and announces changed.

Returns ​

void

Inherited from ​

D3PTransform.refresh


setLayout() ​

ts
setLayout(layout): void;

Defined in: core/transforms.ts:114

Change the layout and recompute.

Parameters ​

layout ​
offset? ​

D3PStackOffset

order? ​

D3PStackOrder

Returns ​

void


watch() ​

ts
protected watch(): void;

Defined in: core/transforms.ts:21

Recompute whenever an input changes, and when it is destroyed.

Returns ​

void

Inherited from ​

D3PTransform.watch

Properties ​

bus ​

ts
readonly bus: D3PBus;

Defined in: core/object.ts:27

The bus the object uses for its events.

Inherited from ​

D3PTransform.bus


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 ​

D3PTransform.e


inputs ​

ts
protected readonly inputs: D3PSeries[];

Defined in: core/transforms.ts:16

Inherited from ​

D3PWaterfall.inputs


isDestroying ​

ts
isDestroying: boolean = false;

Defined in: core/object.ts:31

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

Inherited from ​

D3PTransform.isDestroying


offset ​

ts
offset: D3PStackOffset;

Defined in: core/transforms.ts:100

How the layers are placed: on top of each other, as shares, around zero... Change it with setLayout, which stacks again.


order ​

ts
order: D3PStackOrder;

Defined in: core/transforms.ts:102

The order of the layers. Change it with setLayout, which stacks again.


series ​

ts
readonly series: D3PSeries[];

Defined in: core/transforms.ts:96

The layers, one for each input: draw them and link them to an auto domain.


subs ​

ts
protected readonly subs: D3PSubscriptions;

Defined in: core/object.ts:33

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

Inherited from ​

D3PTransform.subs