cytoscape.js

Cytoscape.js, graph is not displayed with correct settings

廉价感情. 提交于 2019-12-25 05:26:28
问题 Good day for all. I apologize in advance for any errors in the letter. After D3.js i had started learning new for me library - cytoscape.js. Simple examples is working, but then I try to use in my angular.js-project the cytoscape.js - I had some strange situation: after a skeleton example from this: http://jsbin.com/gist/a1aea574f0e248b2b38e?js,output I get blank canvas on page from cytoscape.js. All canvas has width as screen width, but height = 0. I checked my cy object - all elements was

Cytoscape Graph is not showing

放肆的年华 提交于 2019-12-25 03:06:19
问题 I am trying to show a cytoscape graph in an ext window. Everything is working well, until i add the ext-all.css, the graph is no longer displayed. This is the panel were the graph is supposed to be shown ( the #cy div) var formPanel2 = new Ext.form.FormPanel({ id : 'graph_model', bodyStyle : 'padding:10px', width :400, height : 400, overflow:'auto', items : [ { html: "<div id='cy' style=' height: 100%; width: 100%; position: absolute; left: 0; top: 0 '></div>", xtype: "panel"} ] }); where is

cytoscape.js pan and z-index/ foregrounding Elements on Click

点点圈 提交于 2019-12-24 16:29:54
问题 I've been using cytoscape.js, and I've run into a few issues while trying to use the graphs. 1) Is there a way to pan by clicking and dragging the background? It seems like it should work, but I've been totally unable to get it to. At some point I'll probably add panzoom, but if it's possible to do it without as well that would be helpful. Here's a jsfiddle, which contains a simplified version of my code. The zoomEnabled: false is working properly, but the panningEnabled: true does not seem

Cytoscape.js dynamically add nodes without moving the others

被刻印的时光 ゝ 提交于 2019-12-24 10:55:21
问题 I am working on an application that fetches data from a database and I would like to show them as graph. I managed the "tap" event on a node by showing their neighbors (nodes and connection links). The problem is that, every time I want to show the neighbors, all the graph is re-rendered and if some nodes were moved before, they lose their previous position. Is there a way to add only the neighbors without affecting the position of the node already present in the layout? Important : the

js.cytoscape generating graph left to right

半世苍凉 提交于 2019-12-24 02:45:17
问题 I am using js.cytoscape, and need to generate a graph from left to right. when I use the layouts, it generate the chart from top to the bottom code.js file is as follows var cy = window.cy = cytoscape({ container: document.getElementById('cy'), boxSelectionEnabled: false, autounselectify: true, layout: { name: 'dagre' }, style: [ { selector: 'node', style: { 'content': 'data(id)', 'text-opacity': 0.5, 'text-valign': 'center', 'text-halign': 'right', 'background-color': '#11479e' } }, {

Getting list of edges in cytoscape.js when clicking on a node

泪湿孤枕 提交于 2019-12-23 16:22:56
问题 I'm trying to create a cytoscape.js graph in which clicking on a node will change the color of any edges connecting to the node. I've been able to locate individual components but am not able to get them to work together. I'm new to JavaScript as well as cytoscape.js so make no assumptions in your answer. From the examples, a mouse-click event can be registered and in this case prints the ID of a node onto the console. cy.on('tap', 'node', function(evt){ var node = evt.cyTarget; console.log(

Referencing Cytoscape elements from external code

不羁的心 提交于 2019-12-23 04:19:07
问题 I'm trying to integrate qTip2 to show tooltips on mouse events for elements in a Cytoscape graph. I'm using this example. However, in my testing, the attempt to call qtip() on the selected element object fails, and IE for example says object doesn't support property or method qtip. I am sure the selector is working, since I can get at all of the element's properties. What am I missing? Any insight is appreciated. Thanks! Code: cy.getElementById("n1").qtip({ content: { text: 'My tooltip text'

Cytoscape.js not displaying?

两盒软妹~` 提交于 2019-12-22 18:05:29
问题 I previously asked how to remotely load cytoscape as a dependency. @GBE provided the following answer <script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/2.7.10/cytoscape.js"></script> So I made an HTML file and copied verbatim introductory example from cytoscape (enclosing it in <script>code</script> . However the result renders nothing. Why? Code below for convenience. Mini-question: why is source enclosed as: <script src="stuff"></script> and everything else is <script> code <

Scalability of Cytoscape.js

元气小坏坏 提交于 2019-12-20 03:18:14
问题 I have a 11MB JSON graph file with about 45K edges and 73K nodes without x, y locations, and I want to display this graph using the BFS layout. I am using promise/deferred to load the file. I haven't been able get Cytoscape to display this graph on chrome. So: Are there some special techniques for displaying large graphs? What is the largest graph anyone has displayed using cytoscape.js? If cytoscape.js won't work are there other JS frameworks that will work for large graphs? 回答1: You are

How to highlight the path between two nodes in CYTOSCAPE JS

*爱你&永不变心* 提交于 2019-12-18 06:54:25
问题 i can create a graph using cytoscape js library . i am following the this tutorial and i implement like this. CODE: $(function(){ // on dom ready $('#cy').cytoscape({ style: cytoscape.stylesheet() .selector('node') .css({ 'content': 'data(id)' }) .selector('edge') .css({ 'target-arrow-shape': 'triangle', 'width': 4, 'line-color': '#ddd', 'target-arrow-color': '#ddd' }) .selector('.highlighted') .css({ 'background-color': '#61bffc', 'line-color': '#61bffc', 'target-arrow-color': '#61bffc',