Skip to content

Home > d3-blueprint > Plugin_2

Plugin_2 interface

A plugin object that hooks into the chart lifecycle.

Signature:

typescript
export interface Plugin<TData = unknown>

Properties

Property

Modifiers

Type

Description

name?

string

(Optional) Used as the event namespace (e.g. postDraw.tooltip).

Methods

Method

Description

destroy(chart)?

(Optional) Called when the chart is destroyed.

install(chart)

Called once immediately when the plugin is installed.

postDraw(chart, data)?

(Optional) Called on every postDraw event.

postTransition(chart, data)?

(Optional) Called after all transitions have completed.

preDraw(chart, data)?

(Optional) Called on every preDraw event.