Class: GraphLayer
Defined in: layers/graph.ts:87
A node-link graph: edges as line segments, nodes as round points.
Implements
Constructors
Constructor
ts
new GraphLayer(gl, opts): GraphLayer;Defined in: layers/graph.ts:110
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | GraphOptions |
Returns
GraphLayer
Properties
colorCss
ts
readonly colorCss: string;Defined in: layers/graph.ts:90
id
ts
readonly id: string;Defined in: layers/graph.ts:88
Implementation of
name
ts
readonly name: string;Defined in: layers/graph.ts:89
yAxis
ts
readonly yAxis: string;Defined in: layers/graph.ts:91
The y axis this layer is bound to.
Implementation of
Methods
bounds()
ts
bounds():
| {
x: Range;
y: Range;
}
| null;Defined in: layers/graph.ts:203
Data-space bounds of this layer, for autoscaling. null if empty.
Returns
| { x: Range; y: Range; } | null
Implementation of
dispose()
ts
dispose(): void;Defined in: layers/graph.ts:228
Returns
void
Implementation of
draw()
ts
draw(state): void;Defined in: layers/graph.ts:208
Parameters
| Parameter | Type |
|---|---|
state | DrawState |
Returns
void
Implementation of
setData()
ts
setData(data): void;Defined in: layers/graph.ts:185
Replace nodes and edges (for streaming). When x/y are omitted, node positions are recomputed with the package's force layout from the edges.
Parameters
| Parameter | Type |
|---|---|
data | GraphData |
Returns
void