@graphty/layout
Version:
graph layout algorithms based on networkx
16 lines (15 loc) • 580 B
TypeScript
/**
* Planar layout algorithm
*/
import { Graph, PositionMap } from '../../types';
/**
* Position nodes without edge intersections (planar layout).
*
* @param G - Graph
* @param scale - Scale factor for positions
* @param center - Coordinate pair around which to center the layout
* @param dim - Dimension of layout (must be 2)
* @param seed - Random seed for reproducible layouts
* @returns Positions dictionary keyed by node
*/
export declare function planarLayout(G: Graph, scale?: number, center?: number[] | null, dim?: number, seed?: number | null): PositionMap;