Geng
Geng

Reputation: 51

Create hierarchy layout in cytoscape js that allows parent child relationships?

For instance I want to visualise my graph in level order hierarchy, but each node can have multiple parents and children, and i want to be able to traverse the graph in the GUI by selecting 2 nodes.

Currently the 'breadthfirst' layout allows hierarchy, while the 'cose' layout allows compound nodes (nodes that can have multiple parents and children). Is there a way to tweak the source code for either, or to make my own custom layout from scratch for cytoscape?

Upvotes: 4

Views: 3237

Answers (1)

maxkfranz
maxkfranz

Reputation: 12242

Try the existing layouts:

breadthfirst and dagre are DAG-specific layouts. cola supports DAG-like flow, but it's a force-directed layout.

Or write your own layout: http://js.cytoscape.org/#extensions/api

Upvotes: 4

Related Questions