UNPKG

@graphty/layout

Version:

graph layout algorithms based on networkx

17 lines (16 loc) 672 B
/** * Spiral layout algorithm */ import { Graph, PositionMap } from '../../types'; /** * Position nodes in a spiral layout. * * @param G - Graph or list of nodes * @param scale - Scale factor for positions * @param center - Coordinate pair around which to center the layout * @param dim - Dimension of layout * @param resolution - Controls the spacing between spiral elements * @param equidistant - Whether to place nodes equidistant from each other * @returns Positions dictionary keyed by node */ export declare function spiralLayout(G: Graph, scale?: number, center?: number[] | null, dim?: number, resolution?: number, equidistant?: boolean): PositionMap;