Skip to content

Class: D3PLegendBundle ​

Defined in: core/legend.ts:112

Convenience bundle: legend manager + container.

Constructors ​

Constructor ​

ts
new D3PLegendBundle(opts?): D3PLegendBundle;

Defined in: core/legend.ts:118

Parameters ​

opts? ​

D3PLegendManagerOptions & D3PHtmlContainerOptions = {}

Returns ​

D3PLegendBundle

Methods ​

addToChart() ​

ts
addToChart(chart): void;

Defined in: core/legend.ts:124

Attaches the container and the manager to the chart, and shows the legend.

Parameters ​

chart ​

D3PChart

Returns ​

void


destroy() ​

ts
destroy(): void;

Defined in: core/legend.ts:135

Destroys the manager and the container.

Returns ​

void


removeFromChart() ​

ts
removeFromChart(chart): void;

Defined in: core/legend.ts:130

Detaches the manager and the container from the chart.

Parameters ​

chart ​

D3PChart

Returns ​

void

Properties ​

container ​

ts
readonly container: D3PLegendContainer;

Defined in: core/legend.ts:116

The container that draws the legend.


manager ​

ts
readonly manager: D3PLegendManager;

Defined in: core/legend.ts:114

The manager that tells what the legend shows.