Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 806
Geng Avatar asked Oct 29 '25 14:10

Geng


1 Answers

Try the existing layouts:

  • http://js.cytoscape.org/#layouts
  • http://js.cytoscape.org/#extensions/layout-extensions

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

like image 63
maxkfranz Avatar answered Oct 31 '25 05:10

maxkfranz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!