Class: PlotGrid
Defined in: grid.ts:69
Constructors
Constructor
new PlotGrid(container, options?): PlotGrid;Defined in: grid.ts:82
Parameters
| Parameter | Type |
|---|---|
container | HTMLElement |
options | PlotGridOptions |
Returns
PlotGrid
Properties
cols
readonly cols: number;Defined in: grid.ts:71
rows
readonly rows: number;Defined in: grid.ts:70
Accessors
element
Get Signature
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
get plots(): Plot[];Defined in: grid.ts:126
Every 2D plot in the grid, in creation order.
Returns
Plot[]
Methods
addPlot()
addPlot(place?, options?): Plot;Defined in: grid.ts:162
Add a Cartesian plot in the next (or given) cell.
Parameters
| Parameter | Type |
|---|---|
place | CellPlacement |
options | PlotOptions |
Returns
addPlot3D()
addPlot3D(place?, options?): Plot3D;Defined in: grid.ts:167
Add a 3D plot in the next (or given) cell.
Parameters
| Parameter | Type |
|---|---|
place | CellPlacement |
options | Plot3DOptions |
Returns
addPolar()
addPolar(place?, options?): PolarPlot;Defined in: grid.ts:172
Add a polar plot in the next (or given) cell.
Parameters
| Parameter | Type |
|---|---|
place | CellPlacement |
options | PolarOptions |
Returns
adopt()
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
| Parameter | Type |
|---|---|
plot | T |
Returns
T
cell()
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
| Parameter | Type |
|---|---|
place | CellPlacement |
Returns
HTMLDivElement
destroy()
destroy(): void;Defined in: grid.ts:209
Returns
void
refresh()
refresh(): void;Defined in: grid.ts:202
Render every cell — a Plot3D needs this once its layers are in.
Returns
void
relink()
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