MAIDR Documentation - v4.4.0
    Preparing search index...

    Interface TreemapPoint

    One node of a treemap, or of any other hierarchy drawn as area.

    The hierarchy is declared as a path rather than as a parent pointer. A path is acyclic by construction and cannot dangle: there is no id to point at a node that was never emitted, and no way to author a cycle. Every producer has one -- a d3.hierarchy walk yields it directly, and Plotly's labels/parents pair resolves to it -- and it doubles as the breadcrumb the reader is told when they are several levels down.

    Interior nodes need not be declared. A layer emitting only its leaves -- which is what a treemap draws -- gets its interior nodes and their totals derived from the paths.

    // A leaf three levels down, with its two ancestors named.
    { x: 'France', y: 67.4, path: ['World', 'Europe'] }
    interface TreemapPoint {
        x: string | number;
        y?: number;
        path?: (string | number)[];
    }
    Index

    Properties

    Properties

    x: string | number

    What the node is called. Unique among its siblings, not chart-wide.

    y?: number

    The node's magnitude.

    Omitted for an interior node whose value is the sum of its children, which is the ordinary case. A declared value is kept even where it disagrees with that sum: a parent may carry mass no child accounts for, and overwriting it would be inventing data.

    path?: (string | number)[]

    The node's ancestors, root first, excluding the node itself.

    A top-level node omits it or declares [].