Skip to content

Interface: Layer

Defined in: layers/layer.ts:18

A drawable data series backed by GPU buffers.

Properties

id

ts
readonly id: string;

Defined in: layers/layer.ts:19


yAxis

ts
readonly yAxis: string;

Defined in: layers/layer.ts:21

The y axis this layer is bound to.

Methods

bounds()

ts
bounds(): 
  | {
  x: Range;
  y: Range;
}
  | null;

Defined in: layers/layer.ts:23

Data-space bounds of this layer, for autoscaling. null if empty.

Returns

| { x: Range; y: Range; } | null


colorInfo()?

ts
optional colorInfo(): ColorInfo | null;

Defined in: layers/layer.ts:28

Colormap + value range, when this layer maps values to colours — the plot uses it to draw a colorbar. null/absent for solid-coloured layers.

Returns

ColorInfo | null


dispose()

ts
dispose(): void;

Defined in: layers/layer.ts:30

Returns

void


draw()

ts
draw(state): void;

Defined in: layers/layer.ts:29

Parameters

ParameterType
stateDrawState

Returns

void

MIT licensed. WebGL2 required.