Dagre is a JavaScript library that makes it easy to lay out directed graphs on the client-side.
Questions tagged [dagre]
75 questions
3
votes
1 answer
Bootstrap in Dagre D3 is not correctly rendering
Hello i have a problem with rendering Bootstrap with
Dagre D3 in JavaScript. Dagre D3 is a Libary based on D3.
First Problem is that the star-glyphicon is only in the first node, but not in the second node. Why?
Second Problem is that the Dropdown…
user7222571
3
votes
0 answers
Rank nodes on type in JointJS in combination with Dagre
I would like to know if/how it is possible to rank nodes depending on a certain type. So lets say Dependend I want to align on the same level as the current node and child below and parent above.
Is this possible? I use Dagre now to align my nodes…

Kevin van den Heuvel
- 31
- 3
3
votes
1 answer
Layout DirectedGraph (dagre) only on a subset of nodes
I'm looking for a way to layout only a subset of nodes of a directed graph with JointJS / Rappid diagramming library.
I need some "fixed" nodes in the graph and layout the "others", assuming that they can be connected between each other or with some…

brillantef
- 134
- 8
3
votes
0 answers
How to create collapsible using digraph or D3
I want to create collapsible digraph using dagre.js. But it generates static graphs with no click events. I want to toggle children of a node when user click on the graph node.
any help will be appreciated..

Coderzz
- 55
- 7
3
votes
1 answer
Dynamically adding nodes to JointJS graph. Set rank ordering in joint.layout.DirectedGraph?
I'm implementing a process flow diagram in JointJS where the user can delete elements as well as add new ones, and re-link things in a variety of orderings. The graph is using the auto-layout features of the joint.layout.DirectedGraph library with…

Mark Dyson
- 305
- 1
- 12
3
votes
1 answer
JointJS unable to connect ports, says "getPortSelector" not a function
I am having problems connecting ports on custom elements in JointJS. I define the elements using this code:
function defineElement(id, parentID, type, elementLabel, toolName, timeRequired, userAccessing, IPInfo, notes) {
this.id = id;
…

Mark Dyson
- 305
- 1
- 12
3
votes
0 answers
Draw an ERM with Dagre-D3
I try to create an ERM with Dagre-D3. The relations should be displayed directly between the entities attributes. (see screenshot). By grouping the attributes in parent nodes I'm quite there, but some of the algorithms in the dagre graphlib separate…

byMike
- 319
- 2
- 9
2
votes
0 answers
Layouting bug in react-flow-renderer v10
I just migrated to react-flow-renderer version 10 about 5 hours back (it launched around 10 hours ago). I am trying to arrange nodes on a graph with the help of dagre library for layouting & Vite js as a build tool
However, I keep getting thrown the…

Ankit Sanghvi
- 467
- 5
- 18
2
votes
1 answer
Cytoscape - Adding Dynamic Height and then using fit function
I have a graph where I set the dynamic height for the graph because the graph can have different height based on the data we receive from the backend so I am calculating the height based on the number of nodes.
Also, I am using Dagre layout with…

Nike Star Overflow
- 21
- 1
2
votes
0 answers
Focus/Zoom in on part of the graph or a specific set of nodes or a single node
I am currently using Cytoscape to create a large graph with 500 nodes. I am using Dagre for the hierarchical layout.
Currently the graph is small on the screen because of number of nodes which makes sense but
Is there a way to focus on a single node…

Learn AspNet
- 1,192
- 3
- 34
- 74
2
votes
0 answers
Add custom react component as label in Dagre D3
I'm using dagre-d3 library for creating a flow path. I need to have custom component for every label but its not rendering react components, it however does render properly if the label is simple html. What do I need to do?
Following is a sample of…

Kartik Pawar
- 35
- 1
- 5
2
votes
0 answers
Cytoscape dagre layout issues - decrease compound node separation and left-align nodes in the same rank
I am using Cytoscape.js with dagre layout in order to visualize a tree like hierarchy. I have a couple of questions regarding the layout. You can check actual and expected snapshots and examine a runnable sample here.
Nodes in each rank/hierarchy…

user1781328
- 48
- 7
2
votes
1 answer
Drawing binary search tree with Cytoscape.js
I am trying to draw a binary search tree using Cytoscape.js. I am using Dagre layout. In my tree, each node has exactly two children - I am creating nodes with 'null' labels for empty subtrees. My problem is that sometimes the left child is on the…

tomie
- 131
- 8
2
votes
3 answers
dagre-d3 js Zoom Fit to all contents
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…

django
- 2,809
- 5
- 47
- 80
2
votes
1 answer
Adjust shape size in cytoscape.js with dagre layout
I am trying to resize the shapes of the nodes to the size of the node text. I followed instructions from https://github.com/cytoscape/cytoscape.js/issues/649 . However:
The shapes always end up with height = width
The size of all shapes is the…

Marcus
- 161
- 1
- 2
- 12