Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arranging only a subset of the graph nodes in a particular layout using cytoscape.js

Cytoscape JS offers an interesting feature called LAYOUTS. I want to arrange a collection of nodes in a circular layout. But I do not want all the nodes of my network graph to lie on that circle.

How can I do this using cytoscape.js?

Additional Explanation (optional)-

Here is an example I built using Arbor JS, which I am considering re-implementing using Cytoscape in a fixed manner, showing all nodes at once.- Cluster-Mapping

I want just the Nodes (orange dots) to be represented on a circle and NOT the Instances (brown rectangles) that appear on hovering in this arbor based example.

like image 312
Pranjal Mittal Avatar asked Oct 21 '25 14:10

Pranjal Mittal


2 Answers

This is now possible with eles.layout() (version 3.7).

Refer to the documentation: eles.layout()

like image 153
Lomtrur Avatar answered Oct 23 '25 02:10

Lomtrur


This is a planned feature. I created a ticket for you to track its progress. https://github.com/cytoscape/cytoscape.js/issues/295

like image 35
maxkfranz Avatar answered Oct 23 '25 04: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!