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.
@@ -16,7 +17,7 @@ React D3 Tree is a [React](http://facebook.github.io/react/) component that lets
16
17
17
18
18
19
## Demo
19
-
- Current release (stable): https://bkrem.github.io/react-d3-tree/
20
+
- Current release: https://bkrem.github.io/react-d3-tree/
20
21
21
22
22
23
## Installation
@@ -33,6 +34,7 @@ yarn add react-d3-tree
33
34
34
35
## Usage
35
36
```jsx
37
+
importReactfrom'react';
36
38
importTreefrom'react-d3-tree';
37
39
38
40
constmyTreeData= [
@@ -59,7 +61,7 @@ const myTreeData = [
59
61
},
60
62
];
61
63
62
-
classMyComponentextendsComponent {
64
+
classMyComponentextendsReact.Component {
63
65
render() {
64
66
return (
65
67
{/* <Tree /> will fill width/height of its container; in this case `#treeWrapper` */}
@@ -127,6 +129,7 @@ Statically hosted JSON or CSV files can be used as data sources via the addition
0 commit comments