@graphty/layout
Version:
graph layout algorithms based on networkx
13 lines (12 loc) • 694 B
TypeScript
import type { Graph, Node, PositionMap } from '../../types';
/**
* Position nodes in layers of straight lines (multipartite layout).
*
* @param G - Graph or list of nodes
* @param subsetKey - Object mapping layers to node sets, or node attribute name
* @param align - The alignment of nodes: 'vertical' or 'horizontal'
* @param scale - Scale factor for positions
* @param center - Coordinate pair around which to center the layout
* @returns Positions dictionary keyed by node
*/
export declare function multipartiteLayout(G: Graph, subsetKey?: Record<number | string, Node | Node[]> | string, align?: 'vertical' | 'horizontal', scale?: number, center?: number[] | null): PositionMap;