Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hierarchy] update links and descriptions in readme #148

Merged
merged 1 commit into from
Sep 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions packages/vx-hierarchy/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ See [this example](https://vx-demo.now.sh/trees) for additional details.
## `<Tree />` and `<Cluster />`

### Properties
<!-- Notes
* className is passed as a prop, but is never called in the component... am I missing something?
* size, nodeSize, and separation are all passed to the d3 layout... should we mention this? Are the links sufficient?
* does this need more detail on linkComponent and nodeComponent?
-->

| Name | Default | Type | Description |
|:--------------|:--------|:-----|:------------
| top | 0 | number | Margin to top
| left | 0 | number | Margin on left
| className | | string | The className for the component
| root | | object | Root node for hierarchical data; see [`d3.hierarchy()`](https://github.com/d3/d3-hierarchy#hierarchy)
| size | [1, 1] | array | Size of tree layout specified by `[width, height]`; see [`tree.size()`](https://github.com/d3/d3-hierarchy#tree_size)
| nodeSize | null | array | Size of tree layout's node size specified by `[width, height]`; see [`tree.nodeSize()`](https://github.com/d3/d3-hierarchy#tree_nodeSize)
| separation | | function | Separation accessor for tree layout; see [`tree.separation()`](https://github.com/d3/d3-hierarchy#tree_separation)
| nodeComponent | | Component | Component to render for links between nodes
| linkComponent | | Component | Component to render for each node
| size | [1, 1] | array | Size of tree/cluster layout specified by `[width, height]`; see [`tree.size()`](https://github.com/d3/d3-hierarchy#tree_size)
| nodeSize | null | array | Size of tree/cluster layout's nodes specified by `[width, height]`; see [`tree.nodeSize()`](https://github.com/d3/d3-hierarchy#tree_nodeSize)
| separation | | function | Separation accessor for tree/cluster layout; see [`tree.separation()`](https://github.com/d3/d3-hierarchy#tree_separation)
| nodeComponent | [`<HierarchyDefaultNode />`](https://github.com/hshoff/vx/blob/master/packages/vx-hierarchy/src/HierarchyDefaultNode.js) | Component | Component to render for each node
| linkComponent | [`<HierarchyDefaultLink />`](https://github.com/hshoff/vx/blob/master/packages/vx-hierarchy/src/HierarchyDefaultLink.js) | Component | Component to render for links between nodes

## Source For Components

* [`<Tree />`](https://github.com/hshoff/vx/blob/master/packages/vx-hierarchy/src/hierarchies/Tree.js)
* [`<Cluster />`](https://github.com/hshoff/vx/blob/master/packages/vx-hierarchy/src/hierarchies/Cluster.js)