Interface TreeNodeDatum

A node as Tree stores it: the RawNodeDatum you passed, plus the internal __rd3t state.

interface TreeNodeDatum {
    __rd3t: { collapsed: boolean; depth: number; id: string };
    attributes?: Record<string, string | number | boolean>;
    children?: TreeNodeDatum[];
    name: string;
}

Hierarchy (View Summary)

Properties

__rd3t: { collapsed: boolean; depth: number; id: string }

The node's generated ID, its depth in the tree (the root node has depth 0), and whether it's collapsed.

attributes?: Record<string, string | number | boolean>

Extra details about the node. The default node lists each key-value pair below the name.

children?: TreeNodeDatum[]

The node's child nodes.

name: string

The node's name. The default node shows it as the main label.