g3-toolkit API Reference
    Preparing search index...

    Interface LayoutMetrics

    interface LayoutMetrics {
        aspectRatio: number;
        bends: number;
        bounds: { height: number; width: number; x: number; y: number };
        crossings: number;
        edgeCount: number;
        nodeCount: number;
        totalEdgeLength: number;
    }
    Index

    Properties

    aspectRatio: number

    bounds.width / bounds.height; 1 when height is 0 (degenerate).

    bends: number

    Interior direction changes summed over all edges (collinear interior points do not count as bends).

    bounds: { height: number; width: number; x: number; y: number }

    Bounding box of all node boxes; 0-area collapses to width/height 0.

    crossings: number

    Proper pairwise edge-segment crossings (shared endpoints excluded).

    edgeCount: number
    nodeCount: number
    totalEdgeLength: number

    Sum of polyline lengths over all edges.