Skip to content

Commit 9f40774

Browse files
committed
Merge branch 'docs'
2 parents 29f5b24 + 093df41 commit 9f40774

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
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.
1111

1212

13-
## Contents
14-
- [Contents](#contents)
13+
## Contents <!-- omit in toc -->
1514
- [Demo](#demo)
1615
- [Installation](#installation)
1716
- [Usage](#usage)
@@ -21,12 +20,15 @@ React D3 Tree is a [React](http://facebook.github.io/react/) component that lets
2120
- [Individual `shapeProps`](#individual-shapeprops)
2221
- [Styling](#styling)
2322
- [Pre-defining a node's `_collapsed` state](#pre-defining-a-nodes-_collapsed-state)
23+
- [Keeping large trees responsive](#keeping-large-trees-responsive)
2424
- [External data sources](#external-data-sources)
2525
- [Example](#example)
2626
- [Using foreignObjects](#using-foreignobjects)
2727
- [`nodeLabelComponent`](#nodelabelcomponent)
2828
- [Example](#example-1)
2929
- [Recipes](#recipes)
30+
- [Auto-centering inside `treeContainer`](#auto-centering-inside-treecontainer)
31+
- [Adding & removing nodes dynamically](#adding--removing-nodes-dynamically)
3032

3133

3234
## Demo
@@ -280,6 +282,13 @@ Clarifications:
280282

281283
> **Note:** `props.useCollapseData` and `props.initialDepth` are mutually exclusive. If `useCollapseData` is set, `initialDepth` values will be ignored.
282284
285+
286+
## Keeping large trees responsive
287+
Attempting to render large trees with animated transitions may cause significant input lag. This is due to limitations related to the way D3's `select().transition()` enqueues calls to `requestAnimationFrame`, discussed [here](https://github.com/bkrem/react-d3-tree/issues/41#issuecomment-338425414).
288+
289+
Until a custom debounce for expand/collapse has been implemented, **it is therefore recommended to set `props.transitionDuration` to `0` for large tree graphs** if you're experiencing responsiveness issues.
290+
291+
283292
## External data sources
284293
Statically hosted JSON or CSV files can be used as data sources via the additional `treeUtil` module.
285294

@@ -384,4 +393,5 @@ render() {
384393

385394

386395
## Recipes
387-
* [Auto-centering inside `treeContainer`](https://codesandbox.io/s/vvz51w5n63)
396+
#### [Auto-centering inside `treeContainer`](https://codesandbox.io/s/vvz51w5n63)
397+
#### [Adding & removing nodes dynamically](https://codesandbox.io/s/jz1v7o2ryy)

0 commit comments

Comments
 (0)