0

I would like to render a cytoscape graph to a div position. In the documentation, I just found how it can be rendered to dom.

What about a specific div ?

Bhavin Bhadani
  • 22,224
  • 10
  • 78
  • 108
Khouloud
  • 81
  • 1
  • 1
  • 10

1 Answers1

1

You can render this to any DOM element including DIV:

var cy = cytoscape({
  container: document.getElementById('your-div-id-here'),

  ...your parameters here...
});


// or (but then getting the cy reference is more difficult)
$('#your-div-id-here').cytoscape({
  ...your parameters here...
});

Here is the working example: fiddle

maxkfranz
  • 11,896
  • 1
  • 27
  • 36
Ivan
  • 769
  • 5
  • 17
  • @maxkfranz can you please help me to resolve this problem: [http://stackoverflow.com/questions/32503787/cytoscape-graph-is-not-showing](http://stackoverflow.com/questions/32503787/cytoscape-graph-is-not-showing) – Khouloud Sep 10 '15 at 14:07