Skip to content

Commit c153b0c

Browse files
committed
Removes unrequired parent pointer key from docs
1 parent a537823 commit c153b0c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import Tree from 'react-d3-tree';
3737
const myTreeData = [
3838
{
3939
name: 'Top Level',
40-
parent: 'null',
4140
attributes: {
4241
keyA: 'val A',
4342
keyB: 'val B',
@@ -46,7 +45,6 @@ const myTreeData = [
4645
children: [
4746
{
4847
name: 'Level 2: A',
49-
parent: 'Top Level',
5048
attributes: {
5149
keyA: 'val A',
5250
keyB: 'val B',
@@ -55,7 +53,6 @@ const myTreeData = [
5553
},
5654
{
5755
name: 'Level 2: B',
58-
parent: 'Top Level',
5956
},
6057
],
6158
},
@@ -79,7 +76,7 @@ class MyComponent extends Component {
7976
## Props
8077
| Property | Type | Options | Required? | Default | Description |
8178
|----------------|-----------------|-------------------------|-----------|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
82-
| `data` | `array` | | required | `undefined` | Single-element array containing hierarchical object (see `myTreeData` above). <br /> Contains (at least) `name` and `parent` keys. |
79+
| `data` | `array` | | required | `undefined` | Single-element array containing hierarchical object (see `myTreeData` above). <br /> Must contain (at least) `name` key. |
8380
| `orientation` | `string` (enum) | `horizontal` `vertical` | | `horizontal` | `horizontal` - Tree expands left-to-right. <br /><br /> `vertical` - Tree expands top-to-bottom. |
8481
| `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). |
8582
| `pathFunc` | `string` (enum) | `diagonal` `elbow` | | `diagonal` | `diagonal` - Renders smooth, curved edges between parent-child nodes. <br /><br /> `elbow` - Renders sharp edges at right angles between parent-child nodes. |

0 commit comments

Comments
 (0)