data | object | Yes | — | Hierarchical data structure with children and values. |
childrenAccessor | string | function | — | "children" | Field name or function to access children array. |
valueAccessor | string | function | — | "value" | Field name or function to access node value for sizing. |
nodeIdAccessor | string | function | — | "name" | Field name or function to access node identifier. |
colorBy | string | function | — | — | Field name or function to determine node color. |
colorScheme | string | array | — | "category10" | Color scheme for nodes or custom colors array. |
colorByDepth | boolean | — | false | Color nodes by hierarchy depth level. |
showLegend | boolean | — | true (when colorBy set) | Show a categorical legend for colorBy. |
legendPosition | "right" | "left" | "top" | "bottom" | — | "right" | Position the legend around the plot. |
legendInteraction | "highlight" | "isolate" | "none" | — | "none" | Highlight or isolate categories from the legend. |
showLabels | boolean | — | true | Show labels on treemap cells. |
labelMode | "leaf" | "parent" | "all" | — | "leaf" | Which nodes to label. "leaf" labels only leaf nodes, "parent" labels depth-1 group headers, "all" labels everything. |
nodeLabel | string | function | — | nodeIdAccessor | Node label accessor. |
padding | number | — | 4 | Padding between parent and child rectangles (pixels). Makes parent containers visible. |
paddingTop | number | — | 0 (18 when labelMode="parent") | Extra padding at the top of parent nodes. Provides space for parent label text. |
enableHover | boolean | — | true | Enable hover annotations. |
tooltip | object | function | — | — | Tooltip configuration or render function. |
width | number | — | 600 | Chart width in pixels. |
height | number | — | 600 | Chart height in pixels. |
margin | object | — | { top: 10, bottom: 10, left: 10, right: 10 } | Margin around the chart area. |
title | string | — | — | Chart title displayed at the top. |
perspective | string | object | — | "flat" | Parallel projection applied after layout: "isometric", "pixel", "dimetric", "military", "cabinet", or a config object (elevation, ground grid/plate, regions, edges.route, labels, transition). Cells lie on the ground; marks: "extrude" raises leaf cells into prisms while containers stay flat. Layout is unchanged; tooltips and keyboard focus follow the projected marks. Use for categorical or topological positions, not measured ones.See Perspective. |
frameProps | object | — | — | Additional StreamNetworkFrame props for advanced customization. |