Skip to content

Class: HeatmapLayer

Defined in: layers/heatmap.ts:56

A drawable data series backed by GPU buffers.

Implements

Constructors

Constructor

ts
new HeatmapLayer(gl, opts): HeatmapLayer;

Defined in: layers/heatmap.ts:77

Parameters

ParameterType
glWebGL2RenderingContext
optsHeatmapOptions

Returns

HeatmapLayer

Properties

id

ts
readonly id: string;

Defined in: layers/heatmap.ts:57

Implementation of

Layer.id


yAxis

ts
readonly yAxis: string;

Defined in: layers/heatmap.ts:58

The y axis this layer is bound to.

Implementation of

Layer.yAxis

Methods

bounds()

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

Defined in: layers/heatmap.ts:174

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

Returns

ts
{
  x: Range;
  y: Range;
}
x
ts
x: Range;
y
ts
y: Range;

Implementation of

Layer.bounds


colorInfo()

ts
colorInfo(): ColorInfo | null;

Defined in: layers/heatmap.ts:170

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

Implementation of

Layer.colorInfo


dispose()

ts
dispose(): void;

Defined in: layers/heatmap.ts:190

Returns

void

Implementation of

Layer.dispose


draw()

ts
draw(state): void;

Defined in: layers/heatmap.ts:178

Parameters

ParameterType
stateDrawState

Returns

void

Implementation of

Layer.draw


setData()

ts
setData(
   values, 
   cols?, 
   rows?): void;

Defined in: layers/heatmap.ts:164

Replace the value grid and re-bake the data texture (for streaming).

Parameters

ParameterType
valuesArrayLike<number>
colsnumber
rowsnumber

Returns

void

MIT licensed. WebGL2 required.