dagre

Rendering a family tree with d3 or cytoscape

孤街浪徒 提交于 2021-01-02 06:31:25
问题 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

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

vuejs + dagre-d3 tooltip issue

假如想象 提交于 2020-01-17 07:31:12
问题 I am trying to integrate the below graph(dagre-d3) to my vuejs application. http://www.samsarin.com/project/dagre-d3/latest/demo/hover.html I have successfully able to generate the graph inside the vuejs component. But i am not able to achieve the tooltip functionality which is provided in the graph. They are using a library called tipsy, when i run the graph in a plain html it works fine. But when i use inside the vue application its throwing the below error. [Vue warn]: Error in mounted

Position of a custom shape using dagre

柔情痞子 提交于 2020-01-05 10:04:31
问题 I'm trying to create a custom shape and set x and y axis on the svg, so far I got it done but for on top of my element I have a transform attribute that belongs to a group (g) that references the node, I tried to change the attribute setting a custom transform but without any luck. my question is, how can I change the x and y position for the whole node? render.shapes().task = function(parent, bbox, node) { var shapeSvg = parent.insert('rect', ':first-child') .attr('x', node.x) .attr('y',

dagre-d3 js Zoom Fit to all contents

陌路散爱 提交于 2019-12-08 04:44:40
问题 I am using dagre-d3 which is based upon d3.js. After my graph is rendered I want it to zoom to fit all contents and it must be centered. As you can see I can center it alright but I cant seem to fit all contents as my height is 400. Please note that I want a solution which should be usable to other dagre situation , for example just scaling to 0.5 will fit in this case may be but this is not what i want. JSFIDDLE: https://jsfiddle.net/bababalcksheep/xa9rofm5/8/ CODE: 'use strict'; // // setup

flowcharts in d3js using dagre-d3 or colajs

大兔子大兔子 提交于 2019-12-06 19:45:46
问题 After seeing the quite complex TCP state diagram example of dagre-d3, I figured it would be able to resolve diagrams of similar complexity. In the following diagram, this clearly isn't the case. If the two marked nodes were swapped, all crossings would be resolved. Another interesting thing is that how good the graph is solved seems to depend on the order I set the edges in. The following code g.setEdge("148570019_1100", "148570020_1100", { label: "" }); g.setEdge("148570019_1100", "148570021

flowcharts in d3js using dagre-d3 or colajs

▼魔方 西西 提交于 2019-12-05 02:11:57
After seeing the quite complex TCP state diagram example of dagre-d3, I figured it would be able to resolve diagrams of similar complexity. In the following diagram, this clearly isn't the case. If the two marked nodes were swapped, all crossings would be resolved. Another interesting thing is that how good the graph is solved seems to depend on the order I set the edges in. The following code g.setEdge("148570019_1100", "148570020_1100", { label: "" }); g.setEdge("148570019_1100", "148570021_1100", { label: "" }); g.setEdge("148570019_1100", "148570010_1100", { label: "" }); doesn't give the