Group Node by a field
Opened this issue · 3 comments
federico-acn commented
vasturiano commented
@federico-acn thanks for reaching out.
Like in this example?
https://vasturiano.github.io/force-graph/example/expandable-nodes/
federico-acn commented
Hi, thanks for the reply :)
at each click of the node I get new data via an ajax call:
"nodes": [{ "id": "id1", "name": "name1", "group": 1 }]
"nodes": [{ "id": "id2", "name": "name2", "group": 2 }]
"nodes": [{ "id": "id3", "name": "name3", "group": 1 }]
I would like to know if it would be possible to group all the nodes based on a field (for example: "group") through a click of a button.
vasturiano commented
@federico-acn if you look through the source code of that example you'll see that it does something similar to what you're intending.