Skip to content

Class: HexbinLayer ​

Defined in: layers/hexbin.ts:63

A drawable data series backed by GPU buffers.

Implements ​

Constructors ​

Constructor ​

ts
new HexbinLayer(gl, opts): HexbinLayer;

Defined in: layers/hexbin.ts:86

Parameters ​

ParameterType
glWebGL2RenderingContext
optsHexbinOptions

Returns ​

HexbinLayer

Properties ​

id ​

ts
readonly id: string;

Defined in: layers/hexbin.ts:64

Implementation of ​

Layer.id


yAxis ​

ts
readonly yAxis: string;

Defined in: layers/hexbin.ts:65

The y axis this layer is bound to.

Implementation of ​

Layer.yAxis

Methods ​

bounds() ​

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

Defined in: layers/hexbin.ts:194

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

Returns ​

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

Implementation of ​

Layer.bounds


colorInfo() ​

ts
colorInfo(): ColorInfo | null;

Defined in: layers/hexbin.ts:190

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/hexbin.ts:210

Returns ​

void

Implementation of ​

Layer.dispose


draw() ​

ts
draw(state): void;

Defined in: layers/hexbin.ts:199

Parameters ​

ParameterType
stateDrawState

Returns ​

void

Implementation of ​

Layer.draw


setData() ​

ts
setData(x, y): void;

Defined in: layers/hexbin.ts:181

Replace the point arrays, re-bin and re-upload the cells (for streaming).

Parameters ​

ParameterType
xArrayLike<number>
yArrayLike<number>

Returns ​

void

MIT licensed. WebGL2 required.