Class: ScatterLayer
Defined in: layers/scatter.ts:144
A drawable data series backed by GPU buffers.
Implements
Constructors
Constructor
new ScatterLayer(gl, opts): ScatterLayer;Defined in: layers/scatter.ts:173
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | ScatterOptions |
Returns
ScatterLayer
Properties
colorCss
readonly colorCss: string;Defined in: layers/scatter.ts:147
id
readonly id: string;Defined in: layers/scatter.ts:145
Implementation of
name
readonly name: string;Defined in: layers/scatter.ts:146
yAxis
readonly yAxis: string;Defined in: layers/scatter.ts:148
The y axis this layer is bound to.
Implementation of
Methods
bounds()
bounds():
| {
x: Range;
y: Range;
}
| null;Defined in: layers/scatter.ts:306
Data-space bounds of this layer, for autoscaling. null if empty.
Returns
| { x: Range; y: Range; } | null
Implementation of
colorInfo()
colorInfo(): ColorInfo | null;Defined in: layers/scatter.ts:302
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
dispose()
dispose(): void;Defined in: layers/scatter.ts:375
Returns
void
Implementation of
draw()
draw(state): void;Defined in: layers/scatter.ts:359
Parameters
| Parameter | Type |
|---|---|
state | DrawState |
Returns
void
Implementation of
infoAt()
infoAt(index): string[] | null;Defined in: layers/scatter.ts:325
User-supplied text for a point, shown when it is clicked.
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
string[] | null
pick()
pick(
mode,
cursorPx,
cursorPy,
project): Picked | null;Defined in: layers/scatter.ts:311
Parameters
| Parameter | Type |
|---|---|
mode | PickMode |
cursorPx | number |
cursorPy | number |
project | PickProjection |
Returns
Picked | null
setData()
setData(x, y): void;Defined in: layers/scatter.ts:331
Replace point positions and re-upload (for streaming). Keeps uniform color.
Parameters
| Parameter | Type |
|---|---|
x | ArrayLike<number> |
y | ArrayLike<number> |
Returns
void