cytoscape.js

Rendering a family tree with d3 or cytoscape

只谈情不闲聊 提交于 2021-01-02 06:30:07
问题 I'm having problems generating a good looking family tree with Javascript. Requirements: Each child should be connected to two parents in the tree, not one as in some graphs I've like spouses to be next to each other in the tree (same vertical position) I'd like to organize the nodes by generation vertically, so that you can see people born in the same decade at a glance. One person can have multiple spouses over time, and children with each of them Parents and children can be added freely in

cytoscape: change length of second axis taxi branch

删除回忆录丶 提交于 2020-07-09 05:21:57
问题 I want to create a tree with different branch lengths, looking like this: Is there a possibility of assigning a length to the secondary axis of taxi trees? I tried to assigning a weight to a branch, but every branch has the same length in the x-asis. In the following you can see my code, maybe you see an error or can help me with this problem. Thank you! window.addEventListener("DOMContentLoaded", function() { var toJson = function(res){ return res.Json(); }; var cy = (window.cy = cytoscape({

What's the real meaning of randomize=false using cose-bilkent layout

好久不见. 提交于 2020-06-28 05:03:05
问题 What the real meaning of randomize=false using cose-bilkent layout ? I can only read such a simple comment to describe this feature in this extension wiki page. // Whether to enable incremental mode randomize: true, I also find another description for randomize in cytoscape.js-expand-collapse wiki page. // recommended usage: use cose-bilkent layout with randomize: false to preserve mental map upon expand/collapse So I have learned that randomize: false is to preserve mental map. But what is

What's the real meaning of randomize=false using cose-bilkent layout

浪子不回头ぞ 提交于 2020-06-28 05:02:36
问题 What the real meaning of randomize=false using cose-bilkent layout ? I can only read such a simple comment to describe this feature in this extension wiki page. // Whether to enable incremental mode randomize: true, I also find another description for randomize in cytoscape.js-expand-collapse wiki page. // recommended usage: use cose-bilkent layout with randomize: false to preserve mental map upon expand/collapse So I have learned that randomize: false is to preserve mental map. But what is

how to use different colors to mark nodes in cytoscape.js?

一笑奈何 提交于 2020-06-27 04:09:31
问题 currently I'm trying to realize this function: I've created a color selector on the website. Once a user selects a specific color, the colors of nodes he/she selected and their neighbouring nodes will be changed into the color selected after tap. For example, in the case below, if I select "red" and then choose the node "cytoscape", the "cytoscape" and the "cytoscape.js" will both be red. Now if I change the color into "green" and then I click on "test", the "test" node will change into green

Cytoscape JS - Modifying Container Height After Initialization

↘锁芯ラ 提交于 2020-06-13 05:58:51
问题 I initialize Cytoscape with something that looks like the following: var cy = cytoscape({ container: $('#my-element'), height: 500px }); I would like to change the height of the container element to something other than the original 500px value when an user commits an action. How would I do this with Cytoscape? There is a height() method in the main Cytoscape object, but this only functions as a getter. 回答1: There is a documented method cy.resize() that you can call to redraw the graph to fit

Build a “group by attributes” with cytoscape.js

て烟熏妆下的殇ゞ 提交于 2020-05-30 06:31:42
问题 I'm developping a small application with jquery and cytoscape.js. I can do almost what I expect, however, I'm blocked for several days on this topic : I would like to render the graph similar to what I can do in Cytoscape with the layout "group by attribute". In Cytoscape, the rendering is with circles, but it could be other layout per group. I was unable to find examples and I tried unsucessfully with boundingBox or pan(). The group of nodes filtered is displayed with the right layout (eg:

Build a “group by attributes” with cytoscape.js

故事扮演 提交于 2020-05-30 06:31:27
问题 I'm developping a small application with jquery and cytoscape.js. I can do almost what I expect, however, I'm blocked for several days on this topic : I would like to render the graph similar to what I can do in Cytoscape with the layout "group by attribute". In Cytoscape, the rendering is with circles, but it could be other layout per group. I was unable to find examples and I tried unsucessfully with boundingBox or pan(). The group of nodes filtered is displayed with the right layout (eg:

Is is possible to have a bidirectional edge in Cytoscape.js?

↘锁芯ラ 提交于 2020-05-29 11:56:45
问题 I want to make a network graph that looks similar to this below image. Click on this link to view the image I have searched across and have not found a solution for this using Cytoscape. 回答1: Yes, you can create bidirectional edges in Cytoscape.js. First, the curve-styles of your edges should be different than 'haystack' (below I set it as 'straight'), because 'haystack' doesn't support edge endpoint arrows. Second, you need to specify source and target endpoint arrow shapes. Possible values