Skip to content

Home > d3-blueprint > Layer

Layer class

A Layer manages a single D3 data-join lifecycle (bindData → insert → enter/update/merge/exit).

Signature:

typescript
export declare class Layer<TData = unknown>

Constructors

Constructor

Modifiers

Description

(constructor)(base, options)

Constructs a new instance of the Layer class

Methods

Method

Modifiers

Description

draw(data)

Executes the full data-join lifecycle. Returns a promise that resolves when all transitions complete.

off(eventKey, handler)

Removes a specific handler, or all handlers for the given lifecycle event.

on(eventKey, handler)

Registers a handler for the given lifecycle event.