Skip to content

Class: PlotGrid ​

Defined in: grid.ts:69

Constructors ​

Constructor ​

ts
new PlotGrid(container, options?): PlotGrid;

Defined in: grid.ts:82

Parameters ​

ParameterType
containerHTMLElement
optionsPlotGridOptions

Returns ​

PlotGrid

Properties ​

cols ​

ts
readonly cols: number;

Defined in: grid.ts:71


rows ​

ts
readonly rows: number;

Defined in: grid.ts:70

Accessors ​

element ​

Get Signature ​

ts
get element(): HTMLElement;

Defined in: grid.ts:131

The grid's own element — handy for measuring or styling the whole figure.

Returns ​

HTMLElement


plots ​

Get Signature ​

ts
get plots(): Plot[];

Defined in: grid.ts:126

Every 2D plot in the grid, in creation order.

Returns ​

Plot[]

Methods ​

addPlot() ​

ts
addPlot(place?, options?): Plot;

Defined in: grid.ts:162

Add a Cartesian plot in the next (or given) cell.

Parameters ​

ParameterType
placeCellPlacement
optionsPlotOptions

Returns ​

Plot


addPlot3D() ​

ts
addPlot3D(place?, options?): Plot3D;

Defined in: grid.ts:167

Add a 3D plot in the next (or given) cell.

Parameters ​

ParameterType
placeCellPlacement
optionsPlot3DOptions

Returns ​

Plot3D


addPolar() ​

ts
addPolar(place?, options?): PolarPlot;

Defined in: grid.ts:172

Add a polar plot in the next (or given) cell.

Parameters ​

ParameterType
placeCellPlacement
optionsPolarOptions

Returns ​

PolarPlot


adopt() ​

ts
adopt<T>(plot): T;

Defined in: grid.ts:180

Hand the grid a plot you built yourself in a cell, so it owns the teardown and (for a 2D plot) the linkX / linkY wiring.

Type Parameters ​

Type Parameter
T extends Plot | Plot3D | PolarPlot

Parameters ​

ParameterType
plotT

Returns ​

T


cell() ​

ts
cell(place?): HTMLDivElement;

Defined in: grid.ts:139

Claim a cell and return its (empty) element. Use it to mount something the grid doesn't know about — a legend, a table, a plain <div> of numbers.

Parameters ​

ParameterType
placeCellPlacement

Returns ​

HTMLDivElement


destroy() ​

ts
destroy(): void;

Defined in: grid.ts:209

Returns ​

void


refresh() ​

ts
refresh(): void;

Defined in: grid.ts:202

Render every cell — a Plot3D needs this once its layers are in.

Returns ​

void


ts
relink(): void;

Defined in: grid.ts:193

Re-apply linkX / linkY across the current 2D cells. Called for you by addPlot; call it yourself only after adding plots by hand.

Returns ​

void

MIT licensed. WebGL2 required.