data | object | Yes | — | Hierarchical data object with a children property (or custom accessor). |
layout | "tree" | "cluster" | "partition" | "treemap" | "circlepack" | — | "tree" | Tree layout algorithm. Different layouts suit different data and use cases. |
orientation | "vertical" | "horizontal" | "radial" | — | "vertical" | Projection orientation: top-to-bottom, left-to-right, or circular. |
childrenAccessor | string | function | — | "children" | Field name or function to access children array from each node. |
valueAccessor | string | function | — | "value" | Field name or function to access node value. Used by treemap, circlepack, and partition layouts 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 name or custom colors array. |
colorByDepth | boolean | — | false | Color nodes by their depth level in the hierarchy. |
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. |
edgeStyle | "line" | "curve" | — | "curve" | Edge rendering style: straight lines or curved connectors. |
nodeLabel | string | function | — | (uses nodeIdAccessor) | Label accessor for nodes. |
showLabels | boolean | — | true | Show node labels. |
nodeSize | number | — | 5 | Node circle radius for tree and cluster layouts. |
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: 50, bottom: 50, left: 50, right: 50 } | 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). Nodes stay upright and links lie on the ground; elevation can lift nodes by a field. 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. Escape hatch to the full Frame API. |