UNPKG

@graphty/layout

Version:

graph layout algorithms based on networkx

15 lines (14 loc) 536 B
/** * Circular layout algorithm */ import { Graph, PositionMap } from '../../types'; /** * Position nodes on a circle (2D) or sphere (3D). * * @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 (supports 2D circle or 3D sphere) * @returns Positions dictionary keyed by node */ export declare function circularLayout(G: Graph, scale?: number, center?: number[] | null, dim?: number): PositionMap;