You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React D3 Tree is a [React](http://facebook.github.io/react/) component that lets you represent hierarchical data (e.g. ancestor trees, organisational structure, package dependencies) as an animated & interactive tree graph by leveraging [D3](https://d3js.org/)'s `tree` layout.
9
6
@@ -62,11 +59,13 @@ class MyComponent extends Component {
|`data`|`array`|| required |`undefined`| Single-element array containing hierarchical object (see `myTreeData` above); contains (at least) `name` and `parent` keys. |
68
-
|`orientation`|`string` (enum) |`horizontal``vertical`||`horizontal`|`horizontal` - Tree expands left-to-right. `vertical` - Tree expands top-to-bottom |
69
-
|`translate`|`object`|||`{x: 0, y: 0}`| Translates the graph along the x/y axis by the specified amount of pixels (avoids the graph being stuck in the top left canvas corner) |
70
-
|`pathFunc`|`string` (enum) |`diagonal``elbow`||`diagonal`|`diagonal` - Renders smooth, curved edges between parent-child nodes. `elbow` - Renders sharp edges at right angles between parent-child nodes |
71
-
|`collapsible`|`bool`|||`true`| Sets whether the tree's nodes can be collapsed by clicking them |
72
-
|`initialDepth`|`number`|`0` or greater ||`undefined`| Sets the maximum node depth to which the tree is expanded on its initial render; tree renders to full depth if prop is omitted. |
|`data`|`array`|| required |`undefined`| Single-element array containing hierarchical object (see `myTreeData` above); contains (at least) `name` and `parent` keys. |
65
+
|`orientation`|`string` (enum) |`horizontal``vertical`||`horizontal`|`horizontal` - Tree expands left-to-right. `vertical` - Tree expands top-to-bottom |
66
+
|`translate`|`object`|||`{x: 0, y: 0}`| Translates the graph along the x/y axis by the specified amount of pixels (avoids the graph being stuck in the top left canvas corner) |
67
+
|`pathFunc`|`string` (enum) |`diagonal``elbow`||`diagonal`|`diagonal` - Renders smooth, curved edges between parent-child nodes. `elbow` - Renders sharp edges at right angles between parent-child nodes |
68
+
|`collapsible`|`bool`|||`true`| Toggles ability to collapse/expand the tree's nodes by clicking them |
69
+
|`initialDepth`|`number`|`0` or greater ||`undefined`| Sets the maximum node depth to which the tree is expanded on its initial render; tree renders to full depth if prop is omitted. |
70
+
|`zoomable`|`bool`|||`true`| Toggles ability to zoom in/out on the Tree by scaling the SVG element according to `props.scaleExtent`|
71
+
|`scaleExtent`|`object`|||`{min: 0.1, max: 1}`| Sets the minimum/maximum extent to which the tree can be scaled if `props.zoomable` is true |
0 commit comments