Questions tagged [cytoscape.js]

Cytoscape.js is a JavaScript graph theory / network library for analysis and visualisation (Compatible with CommonJS/Node.js/Browserify/Webpack, AMD/Require.js, jQuery, npm, Bower, jspm, Meteor/Atmosphere, and plain JS/JavaScript)

Cytoscape.js is, according to its website, a JavaScript graph library for analysis and visualisation (compatible with Node.js, jQuery 1.4+, and plain JavaScript).

Cytoscape.js allows you to easily display graphs in your websites and contains a slew of useful functions in graph theory. You can use Cytoscape.js headlessly on Node.js to do graph analysis in the terminal or on a web server.


Related tags :

Asking a question:

  • Reduce your issue to a small example
  • Explain the behavior you experienced and its difference from your expectations
  • Post a reduced working code on codepen.io, plnkr.co or jsfiddle.net

Getting started :

Community:

Advantages:

  • A fully featured graph library written in pure JS
  • Highly optimised
  • Documentation includes live code examples, doubling as an interactive requirements specification
  • Fully serialisable and deserialisable via JSON
  • Uses layouts for automatically or manually positioning nodes
  • For more information please click here
1285 questions
0
votes
1 answer

How to smoothly move from one view to another with cytoscape.js?

I want to be able to smoothly move from one view of a given graph to another, so that the graph gradually moves from its original position and zoom level to the destination defined in the second view, like in an animation. How can I do that with…
Carl Moder
  • 35
  • 1
  • 5
0
votes
1 answer

cytoscapeJS snap to grid and guide lines that interact with other nodes

Can anyone help me out with adding span to grid and guideline functionality for CytoscapeJS ?
Zoli Hali
  • 1
  • 1
0
votes
1 answer

What layout name / type and configuration in cytoscape.js I shod use to achieve the layout of 2 types of entities that appear as a Circle in each Side

What layout name / type and configuration in cytoscape.js I shod use to achieve the layout in the picture below, circular & with 3 levels There are 2 types of entities that appear as a Circle in each Side , 1 type on the left in circular structure…
OBender
  • 2,492
  • 2
  • 20
  • 33
0
votes
1 answer

cytoscape.js - how to determine if a parent node has children

A have a jsfiddle with a simple data structure that adds children to nodes when the node is clicked. I want it to look for existing children of the node clicked. Documentation shows node.children(); - to do this - but it is returning an empty…
Mike Weber
  • 311
  • 2
  • 16
0
votes
0 answers

How come $('#cy').cytoscape works?

I have the following code that is using jQuery and cytoscape. What does $('#cy').cytoscape mean in the following code? I undesrtand the first part (that is, select the element with an id cy), but then it seems it invokes the function called…
qartal
  • 2,024
  • 19
  • 31
0
votes
1 answer

cytoscape.js add node in layout breadthfirst

I start cy (layout=breathfirst) with a group of nodes and egdes. cy calculate the tree-structure very well. But if I add a node later, cy placed the node on position 0,0. How I can inform cy to recalculate the tree structure?
FrankL
  • 1
0
votes
1 answer

How to give dynamic edgeLength for each node in Cytoscape.js?

I am using a concentric layout with number of nodes and if i want to give edgeLength for each node dynamically. How will i be able to achieve that?
Yogesh Jangra
  • 66
  • 1
  • 12
0
votes
1 answer

JQuery, cytoscape.js - How to queue two different loops containing cytoscape animations?

I would like to execute one loop (1.), wait until animations from that loop end, then execute second loop with animations (2.). Can somebody tell me how to do it in an optimal way in this particular case? cy.on("tap", ".story_node", function () { …
rvnlord
  • 3,487
  • 3
  • 23
  • 32
0
votes
1 answer

Multiple unrelated graph instances with the same source elements?

Is it possible to have multiple cytoscape graph instances that are unrelated but share the same source elements? Here is an example of what i'm trying to do : https://jsfiddle.net/fa8hbdnh/ var elements = [ { data: { id: 'n1'}, position:…
dsat
  • 127
  • 1
  • 8
0
votes
1 answer

How to make edges via drag and drop between two node with egdehandles extension in cytospace.js

I have a problem. I know, that this problem is solved here, but I don't know how show it in JS code. I have style: cytoscape.stylesheet() .selector('node') .css({ 'shape': 'data(faveShape)', 'background-color': 'data(faveColor)', …
Dmitry
  • 73
  • 2
  • 11
0
votes
1 answer

Fixed Node Aspect Ratio in cytoscape?

I set my node width to 'label' which automatically sizes the node based on the text in the label. Though now I would like to set my node height to be equal to node width so my shape doesn't look all squish. How do I do that?
user2030360
  • 153
  • 1
  • 6
0
votes
1 answer

cytoscape.js for PPI jsmol. Main difference between cytoscape.js and cytoscape

I want to implement a web application for PPI and 3D strucutres. Anyone know if cytoscape.js is better than cytoscape ?
0
votes
1 answer

Javascript : Cant get divs to align properly

I am trying to create the charts displayed in https://gist.github.com/maxkfranz/eb861f83fb741628342f so basically, i have a bootstrap container and
/*Other divs here*/
AbtPst
  • 7,778
  • 17
  • 91
  • 172
0
votes
1 answer

How to get my element data outside cy for event

How to access element node data outside cy function? and here is my code : function cytoFunc(myJson){ var cy = window.cy = cytoscape({ container: document.getElementById('cy'), // style // elements }); // end of…
Dendi Handian
  • 348
  • 2
  • 12
0
votes
1 answer

How to make orthogonal edges using Cytoscape.js?

How to make orthogonal edges with Cytoscape.js? I have seen this Github issue, but didn't get solution.
evencom
  • 11