cytoscape / cytoscape.js

Graph theory (network) library for visualisation and analysis
https://js.cytoscape.org
MIT License
10.09k stars 1.64k forks source link

I have lot of nodes to configure, Does your charts compute co-ordinates for all nodes and edges? #640

Closed venkata82 closed 10 years ago

venkata82 commented 10 years ago

I see GeneMANIA chart data, It has all hard coded co-ordinates. Is there and algorithm to get those coordinates by an algorithm?

maxkfranz commented 10 years ago

That particular example was exported from the Cytoscape desktop app. The graph already had position data defined from the desktop app.

You'll notice those positions aren't actually being used, if you play around with the example. Here it is with the preset positions from the export: http://jsbin.com/zoxab/1/edit

You can see that the concentric layout automatically positioned the nodes in the actual example, overriding the positions set in the elements JSON: http://jsbin.com/wuvac/latest/edit?js,output

Whatever layout you use (or you can write your own too!) will automatically position the nodes in the graph.

maxkfranz commented 10 years ago

Here's the list of builtin layouts: http://cytoscape.github.io/cytoscape.js/#layouts