Function: registerGraphLayout()
ts
function registerGraphLayout<Options>(name, layout): () => void;Register a layout for arrangement: 'custom' with custom: { name, options }: the layout is called with the graph and custom.options, in calc. Registering a name again replaces it. Returns a function that removes the layout (only if it is still the one registered).
A layout must be deterministic and return a finite position for every node (see GraphLayout). Positions are layout units: the trace fits them to the plot area.
Type Parameters
| Type Parameter | Default type |
|---|---|
Options | unknown |
Parameters
| Parameter | Type |
|---|---|
name | string |
layout | GraphLayout<Options> |
Returns
() => void