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
Misc improvements cleanup from previous PRs (#327)
* Misc improvements cleanup from previous PRs
- Revert DOCUMENTATION.md to previous version
- Adjustments in documentation
- Add copy to clipboard button to sandbox for graph configuration field
- Remove eslint rule new-line-after-var
- Small refactor around graph.builder and graph.helper
- Small refactor marker.helper
* Small improvements in sandbox improve copy to clipboard
* Fix unit test
* Add sample for new size API @terahn#342
* Allow users to select the node.labelPosition in the form
* Fix#322
* Fix#323
-`focusZoom`**[number][96]** zoom that will be applied when the graph view is focused in a node. Its value must be between
398
-
_minZoom_ and _maxZoom_. If the specified _focusZoom_ is out of this range, _minZoom_ or _maxZoom_ will be applied instead.
399
-
**NOTE:** This animation is not trigger by default. In order to trigger it you need to pass down to `react-d3-graph` the
400
-
node that you want to focus via prop `focusedNodeId` along side with nodes and links:`javascript const data = { nodes: this.state.data.nodes, links: this.state.data.links, focusedNodeId: "nodeIdToTriggerZoomAnimation" };`<imgsrc="https://github.com/danielcaldas/react-d3-graph/blob/master/docs/rd3g-zoom-animation.gif?raw=true"width="820"height="480"/> (optional, default `1`)
401
-
-`focusAnimationDuration`**[number][96]** duration (in seconds) for the animation that takes place when focusing the graph on a node. (optional, default `0.75`)
402
-
-`height`**[number][96]** the height of the (svg) area where the graph will be rendered. (optional, default `400`)
403
-
-`nodeHighlightBehavior`**[boolean][97]** 🚅🚅🚅 when user mouse hovers a node that node and adjacent common
404
-
connections will be highlighted (depending on the _highlightDegree_ value). All the remaining nodes and links assume opacity value equal to **highlightOpacity**. (optional, default `false`)
405
-
-`linkHighlightBehavior`**[boolean][97]** 🚅🚅🚅 when the user mouse hovers some link that link and the correspondent nodes will be highlighted, this is a similar behavior
406
-
to _nodeHighlightBehavior_ but for links <small>(just for historical reference this property was introduced in **v1.0.0**)</small>. (optional, default `false`)
407
-
-`highlightDegree`**[number][96]****Possible values: 0, 1 or 2**. This value represents the range of the
408
-
highlight behavior when some node is highlighted. If the value is set to **0** only the selected node will be
409
-
highlighted. If the value is set to **1** the selected node and his 1st degree connections will be highlighted. If
410
-
the value is set to **2** the selected node will be highlighted as well as the 1st and 2nd common degree connections. (optional, default `1`)
411
-
-`highlightOpacity`**[number][96]** this value is used to highlight nodes in the network. The lower
412
-
the value the more the less highlighted nodes will be visible (related to _nodeHighlightBehavior_). (optional, default `1`)
413
-
-`maxZoom`**[number][96]** max zoom that can be performed against the graph. (optional, default `8`)
414
-
-`minZoom`**[number][96]** min zoom that can be performed against the graph. (optional, default `0.1`)
415
-
-`initialZoom`**[number][96]** initial zoom that can be set on the graph. (optional, default `null`)
416
-
-`panAndZoom`**[boolean][97]** 🚅🚅🚅 pan and zoom effect when performing zoom in the graph,
417
-
a similar functionality may be consulted [here][104]. (optional, default `false`)
418
-
-`staticGraph`**[boolean][97]** when setting this value to true the graph will be completely static, thus
397
+
-`focusZoom`**[number][173]** <aid="focus-zoom"href="#focus-zoom">🔗</a> zoom that will be applied when the graph view is focused in a node. Its value must be between
398
+
<i>minZoom</i> and <i>maxZoom</i>. If the specified <i>focusZoom</i> is out of this range, <i>minZoom</i> or <i>maxZoom</i> will be applied instead.</br>
399
+
<b>NOTE</b>: This animation is not trigger by default. In order to trigger it you need to pass down to <code>react-d3-graph</code> the
400
+
node that you want to focus via prop <code>focusedNodeId</code> along side with nodes and links:`javascript const data = { nodes: this.state.data.nodes, links: this.state.data.links, focusedNodeId: "nodeIdToTriggerZoomAnimation" };`<imgsrc="https://github.com/danielcaldas/react-d3-graph/blob/master/docs/rd3g-zoom-animation.gif?raw=true"width="820"height="480"/> (optional, default `1`)
401
+
-`focusAnimationDuration`**[number][173]** <aid="focus-animation-duration"href="#focus-animation-duration">🔗</a> duration (in seconds) for the animation that takes place when focusing the graph on a node. (optional, default `0.75`)
402
+
-`height`**[number][173]** <aid="height"href="#height">🔗</a> the height of the (svg) area where the graph will be rendered. (optional, default `400`)
403
+
-`nodeHighlightBehavior`**[boolean][174]** <aid="node-highlight-behavior"href="#node-highlight-behavior">🔗</a> 🚅🚅🚅 when user mouse hovers a node that node and adjacent common
404
+
connections will be highlighted (depending on the <i>highlightDegree</i> value). All the remaining nodes and links assume opacity value equal to <b>highlightOpacity</b>. (optional, default `false`)
405
+
-`linkHighlightBehavior`**[boolean][174]** <aid="link-highlight-behavior"href="#link-highlight-behavior">🔗</a> 🚅🚅🚅 when the user mouse hovers some link that link and the correspondent nodes will be highlighted, this is a similar behavior
406
+
to <i>nodeHighlightBehavior</i> but for links <small>(just for historical reference this property was introduced in <atarget="_blank"href="https://github.com/danielcaldas/react-d3-graph/releases/tag/1.0.0">v1.0.0</a>)</small>. (optional, default `false`)
407
+
-`highlightDegree`**[number][173]** <aid="highlight-degree"href="#highlight-degree">🔗</a> <b>Possible values: 0, 1 or 2</b>. This value represents the range of the
408
+
highlight behavior when some node is highlighted. If the value is set to <b>0</b> only the selected node will be
409
+
highlighted. If the value is set to <b>1</b> the selected node and his 1st degree connections will be highlighted. If
410
+
the value is set to <b>2</b> the selected node will be highlighted as well as the 1st and 2nd common degree connections. (optional, default `1`)
411
+
-`highlightOpacity`**[number][173]** <aid="highlight-opacity"href="#highlight-opacity">🔗</a> this value is used to highlight nodes in the network. The lower
412
+
the value the more the less highlighted nodes will be visible (related to <i>nodeHighlightBehavior</i>). (optional, default `1`)
413
+
-`maxZoom`**[number][173]** <aid="max-zoom"href="#max-zoom">🔗</a> max zoom that can be performed against the graph. (optional, default `8`)
414
+
-`minZoom`**[number][173]** <aid="min-zoom"href="#min-zoom">🔗</a> min zoom that can be performed against the graph. (optional, default `0.1`)
415
+
-`panAndZoom`**[boolean][174]** <aid="pan-and-zoom"href="#pan-and-zoom">🔗</a> 🚅🚅🚅 pan and zoom effect when performing zoom in the graph,
416
+
a similar functionality may be consulted <atarget="_blank"href="https://bl.ocks.org/mbostock/2a39a768b1d4bc00a09650edef75ad39">here</a>. (optional, default `false`)
417
+
-`staticGraph`**[boolean][174]** <aid="static-graph"href="#static-graph">🔗</a> when setting this value to true the graph will be completely static, thus
419
418
all forces and drag events upon nodes will produce not effect. Note that, if this value is true the nodes will be
420
419
rendered with the initial provided <b>x and y coordinates</b> (links positions will be automatically set
421
420
from the given nodes positions by rd3g), no coordinates will be calculated by rd3g or subjacent d3 modules. (optional, default `false`)
Copy file name to clipboardExpand all lines: src/components/graph/graph.config.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -78,10 +78,10 @@
78
78
* the value is set to <b>2</b> the selected node will be highlighted as well as the 1st and 2nd common degree connections.
79
79
* @param {number} [highlightOpacity=1] - <a id="highlight-opacity" href="#highlight-opacity">🔗</a> this value is used to highlight nodes in the network. The lower
80
80
* the value the more the less highlighted nodes will be visible (related to <i>nodeHighlightBehavior</i>).
81
-
* @param {number} [maxZoom=8] - maxzoomthat can be performed against the graph.
82
-
* @param {number} [minZoom=0.1] - min zoom that can be performed against the graph.
83
-
* @param {number} [initialZoom=null] - initial zoomthat can be set on the graph.
84
-
* @param {boolean} [panAndZoom=false] - 🚅🚅🚅 pan and zoom effect when performing zoom in the graph,
81
+
* @param {number} [initialZoom=null] - <a id="max-zoom" href="#initial-zoom">🔗</a> initial zoom that can be set on the graph.
82
+
* @param {number} [maxZoom=8] - <a id="max-zoom" href="#max-zoom">🔗</a> max zoom that can be performed against the graph.
83
+
* @param {number} [minZoom=0.1] - <a id="min-zoom" href="#min-zoom">🔗</a> min zoom that can be performed against the graph.
84
+
* @param {boolean} [panAndZoom=false] - <a id="pan-and-zoom" href="#pan-and-zoom">🔗</a> 🚅🚅🚅 pan and zoom effect when performing zoom in the graph,
85
85
* a similar functionality may be consulted <a target="_blank" href="https://bl.ocks.org/mbostock/2a39a768b1d4bc00a09650edef75ad39">here</a>.
86
86
* @param {boolean} [staticGraph=false] - <a id="static-graph" href="#static-graph">🔗</a> when setting this value to true the graph will be completely static, thus
87
87
* all forces and drag events upon nodes will produce not effect. Note that, if this value is true the nodes will be
0 commit comments