0%

3d-force-graph

3d-force-graph

Quick start

1
import ForceGraph3D from '3d-force-graph';

or using a script tag

1
<script src="//cdn.jsdelivr.net/npm/3d-force-graph"></script>

then

1
2
const myGraph = new ForceGraph3D(<myDOMElement>)
.graphData(<myData>);

Input JSON syntax

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"nodes": [
{
"id": "id1",
"name": "name1",
"val": 1
},
{
"id": "id2",
"name": "name2",
"val": 10
},
...
],
"links": [
{
"source": "id1",
"target": "id2"
},
...
]
}

Examples