cytoscape.js

live code examples: cytoscape.js initialization — incomplete?

試著忘記壹切 提交于 2019-12-14 03:58:48
问题 Being brand new to cytoscape.js , I may be missing something obvious. Please forgive me if that is so. I am studying the first example offered here: reached from this page Three files are offered -- HTML, CSS, JavaScript -- along with the impression that these three will, when loaded into my browser, create a running example. But the HTML seems to be incomplete, possibly in two ways: the JavaScript on the jsbin page needs to be included via a script tag the variable cy is not defined anywhere

How to create custom style mapping in cytoscape.js?

女生的网名这么多〃 提交于 2019-12-13 21:16:26
问题 Is there a way to add a custom mapper to the new cytoscape.js? I know there is data(nodeKey), but that uses nodeKey's value de novo. Can I set a mapping of my own? Thanks! 回答1: Custom mappers are too expensive in general, so they are not supported in Cytoscape.js. Good performance is one of our top requirements for the library. If you would describe the sort of mapping you're looking for, it may be possible with the API today, or we could work something out that meets your needs. Thanks! 回答2:

multi labels cytoscape js

时间秒杀一切 提交于 2019-12-13 02:33:16
问题 I'd like use two labels per node using cytoscape.js. One inside and another outside of the node, like this link image http://gcuculi.com/imagens/labels-constelation.png. I used qtip for external labels, but I need to print (ctrl+p) this page and qtip div positions are absolute (from document), so they don't appear in right place. There is a way to modify cytoscape.js for two labels or how I prevent qtip from this behavior? Tks!! 回答1: One way to get multiple distinct labels is to use compound

Zoomable background for cytoscape js

十年热恋 提交于 2019-12-13 00:25:45
问题 We're making a graph for a project right now. This graph should show all crossways of a city. And most ways between them. We started of using cytoscape.js for drawing the graph. Now we want a background behind the graph. This background will be the map of that city, so it has to be scrollable and at the right position. Our first idea was to make a rectangle node and give it a background. Than we added the map and put in the right coördinates. Now the map is scrollable and is always at the

Performance and layouts of Cytoscape.js

≡放荡痞女 提交于 2019-12-12 14:13:45
问题 I'm testing the rendering performance of Cytoscape.js. My graph contains about 5000 nodes and 5000 edges without x, y positions, using automatic layout of Cytoscape.js. But it takes more than 15 seconds with euler layout extension after rendering all nodes and edges, the brower of the graph page will get stuck for a while or response slowly in the next operation. As it was said, the Cytoscape.js is limited by the performance of browsers. We load json data from java server client, and load

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 [closed]

喜夏-厌秋 提交于 2019-12-12 04:08:09
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . 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 and the second one on the right

Incrementing the size of nodes in Cytoscape.js by a specific value

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 03:43:57
问题 I am using following json content for specifying the size of each node: "data": { "id": "Name", "name": "NameID", "faveColor": "#86B342", "size": 120 } Once the graph is generated, I wish to increment the size of all nodes by a particular value (which comes from user input). Given the fact that 'data(size)' + value isn't a legit operation, can anyone suggest an apt way to achieve it? Thanks 回答1: You are trying to add a int with string which won't seem to work. Instead try to get the property

cytoscape js Hiding and restoring nodes with edges afterwards

天大地大妈咪最大 提交于 2019-12-12 02:48:09
问题 There is a cool sample at Hide nodes with animation by maxfranz. I am having trouble reverting the state though. Even if i keep the nodes + edges and then run restore on them. The nodes / edges do not reappear. Add doesnt work. Restore doesnt work. I must be missing something. On clicking the node i hide (collapse) the linked nodes and I keep the removedElements in an array, and then store in a sratch with node specific namespace. When the node is clicked again, i want to restore (expand) the

Background image link by data array

独自空忆成欢 提交于 2019-12-12 02:24:49
问题 I get this error in cytoscape.js: "Do not assign mappings to elements without corresponding data (e.g. ele p for property background-image with data field linkImagem ); try a [linkImagem] selector to limit scope to elements with linkImagem defined" Look data array: { data: { id: 'atr1', classificacao : '1', backgroundColor : '#F79646', nomeAtributo : 'Bancos desconfortáveis', angulo : '0', valign : 'top', halign : 'right', linkImagem : 'http://www.fec.unicamp.br/~confterm/imagens/background

Displaying qTip hover on outer nodes of Cytoscape.js graph?

与世无争的帅哥 提交于 2019-12-12 01:58:33
问题 When hovering over the outer nodes of graph in Cytoscape.js, the qTip dialog is not displayed. Is there anyway to display the qTip bubbles upon hovering on an outer node? I can have the qtip popup on nodes in the upper half but not much along the sides of the graph. Especially towards the bottom half. cy.elements('node').qtip({ id: function() { return this.data('id'); }, content: function() { return this.data('name') + '<br /><em>$' + this.data('weight') + '</em>'; }, position: { my: 'bottom