vasturiano / 3d-force-graph

3D force-directed graph component using ThreeJS/WebGL
https://vasturiano.github.io/3d-force-graph/example/large-graph/
MIT License
4.69k stars 826 forks source link

Force-directed tree (DAG mode) #373

Open jaygray0919 opened 4 years ago

jaygray0919 commented 4 years ago

We would like to customize this illustration https://vasturiano.github.io/3d-force-graph/example/tree/

We have hierarchical JSON dataset that support D3 illustrations like these: Dendorgram https://afdsi.org/usda/nalt_dendrogram_english/ Sunburst https://afdsi.org/usda/nalt_full_sunburst/

The JSON dataset is the same.

How would we use our hierarchical JSON in place of the hierarchical CSV used in the example?

In other words, how to replace: d3-dependencies.csv with our JSON data: d3-dependencies.json

RaulPROP commented 4 years ago

You just need to fetch the d3-dependencies.json as you like and then fill the nodes and links properties like in the example.

jaygray0919 commented 4 years ago

OK, we'll follow that technique. I think we'll trim our JSON to two levels to make sure we know how to properly delimit the JSON structure. Will report back progress and examples.

P31N commented 2 years ago

@jaygray0919 its been a while but have you been able to resolve this?

jaygray0919 commented 2 years ago

@P31N we were not. We returned to using the structure also used in Graphviz. The structure is to declare the nodes, then set the binary relationships (subject -> object) with a text field for the relationship (thereby creating a "triple" - ?subject ->objectProperty (predicate) ?object)