Skip to content

Home > d3-blueprint

d3-blueprint package

Classes

Class

Description

ConfigManager

Manages named configuration properties with optional getter/setter transforms.

D3Blueprint

Base class for composable D3 charts. Subclass and override lifecycle hooks (initialize, transform, preDraw, postDraw, postTransition).

Layer

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

Functions

Function

Description

assertLifecycleEvent(key)

Throws if the given string is not a valid lifecycle event key.

isValidLifecycleEvent(key)

Returns true if the given string is a valid lifecycle event key.

Interfaces

Interface

Description

ConfigDefineOptions

Options when defining a config property.

LayerOptions

Options accepted by the Layer constructor.

Plugin_2

A plugin object that hooks into the chart lifecycle.

Variables

Variable

Description

LIFECYCLE_EVENT_NAMES

Ordered D3 data-join lifecycle event names.

Type Aliases

Type Alias

Description

D3Selection

A generic D3 selection accepted across the public API. The generics are any so callers can pass results of d3.select(...) / d3.selectAll(...) directly without casting through d3-selection's invariant generics (e.g. Selection<SVGGElement, unknown, null, undefined> returned by d3.select(svgElement) unifies with this type).

D3Transition

A generic D3 transition. See D3Selection for the widening rationale.

LayerEventMap

Event map passed to Layer constructor via events option.

LifecycleEventKey

Any valid lifecycle event key, including :transition variants.

LifecycleEventName

Base lifecycle event name.

LifecycleHandler

Handler invoked during a non-transition lifecycle phase.

TransitionHandler

Handler invoked during a :transition lifecycle phase.