MAIDR JavaScript API
    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)[];
        kind?: string;
    }
    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 [].

    kind?: string

    What sort of node this is, as the diagram calls it, when the layer's x label is not true of every node: a kanban board's Columns and Cards, an Ishikawa diagram's Effect above its Categorys of Cause. Announced in place of the x label for this node, and tabulated beside its name. A node that declares none, or a blank one, and an ancestor no point declares, are announced with the x label.