Reputation: 5363
I have a graph of people who interact with each other.
The graph is quite messy since everybody interacts with each other. What I need is:
I've read about compound nodes, but the thing is that one node (person) can have many parents and it's not supported in Cytoscape.
This is what it should look like. The red circle is the "main" person. The red rectangle is the first level of interactions. The rest should be hidden till the user clicks on a node, which reveals its direct children.
The only idea I got is to manipulate the data I provide for the chart. Right now I have an array of vertices and edges. Edges have source/target. So I probably can handle it in javascript by manipulating these arrays.
But is it possible to somehow simplify the process?
Upvotes: 1
Views: 1125
Reputation: 1088
You can use view-utilities extension of cytoscape.js which provides hide/show functionality. See its API that has hide
, show
and showHiddenNeighbors
functions. You can also play with its demo here.
Upvotes: 4