Skip to content

@graphty/layout / index / kamadaKawai

Function: kamadaKawai() ​

kamadaKawai(g, options?): LayoutResult

Defined in: indexed/kamada-kawai.ts:147

Kamada-Kawai: positions whose distances best match the ideal distances (networkx's kamada_kawai_layout), rescaled to scale (default 1) about center (default the origin). Weights are distances, as in networkx.

Parameters ​

g ​

GraphSnapshot

the graph; a directed snapshot is laid out as its undirected copy

options? ​

KamadaKawaiOptions = {}

the options

Returns ​

LayoutResult

dim values per node