I have a graph represented with a standard force layout.
Nodes can be clustered by attributes.
Can I represent these clusters with a pack layout?
How will the 2 layouts coexist and how will the x and y coordinates of my nodes be calculated?
edit
I'm thinking I might have to process my data to turn node clusters into individual nodes containing the cluster hierarchy as attribute. I would still welcome an alternative way that doesn't force me to reshape my data if possible.
Here is an example dataset that I transformed to fit into a multi layout approach. The issue here is that I cannot link any of the nodes inside the cluster.
{
"directed": true,
"graph": [],
"nodes": [
{
"id": "node0"
},
{
"id": "node1"
},
{
"id": "node2",
"tree": {
"name": "cluster",
"children": [
{
"id": "node3"
},
{
"id": "node4"
},
{
"id": "node5"
}
]
}
}
],
"links": [
{
"source": 0,
"target": 1
},
{
"source": 1,
"target": 2
},
{
"source": 0,
"target": 2
}
],
"multigraph": false
}
g
elements for the nodes in the force layout. For everything within, the coordinates/dimensions are set by the pack layout. – Noway