score:26
Accepted answer
Yes, you can do this by:
- Disabling the default gravity and charge forces.
- Implementing collision detection.
- Implementing "custom" gravity that attracts each node to its suggested position.
Here's a live example:
Similar techniques were used in Shan Carter's visualization of Obama's 2013 budget proposal, which are further discussed in a tutorial by Jim Vallandingham.
Source: stackoverflow.com
Related Query
- d3.js: suggested node position in force layout
- Fix Node Position in D3 Force Directed Layout
- d3 force layout link position in node
- How to define the node entering position in D3 js force layout
- D3 force directed graph with drag and drop support to make selected node position fixed when dropped
- D3 force layout fix root node at the center
- D3 Force Layout Graph - Self linking node
- Space out nodes evenly around root node in D3 force layout
- Add text label to d3 node in Force layout
- Align Marker on node edges D3 Force Layout
- Recentering D3 force layout diagram on node click
- Inserting a line break in D3 force layout node labels
- How to display a text when mouseover a node in D3 force layout
- Center force directed layout after tick using root node (return to center)
- d3js force node xy start position
- How to get the same node positions in d3's force layout graph
- d3js force node starting position
- D3 Force Layout : How to force a group of node to stay in a given area
- d3js force layout dynamically adding image or circle for each node
- Creating force layout node labels in d3.js
- d3.js Node "jumps back" on fast drag in force layout
- How to pan to a node using d3's force layout
- d3: Optionally add child elements based on node content in force layout
- Show div element on mouseover for node in D3 force layout
- Can't draw links by node property using D3 force layout
- Two labels on one node in a D3 force layout
- Connected link line animation when mouse over on the node in force layout d3
- D3 JS - Force Graph - Doesn't restart layout after removing Node
- Disable node drag in force layout
- Constraining d3 force layout graphs based on node degree
More Query from same tag
- Choosing positioning of a child node in d3
- Add data to server-side SVG with D3
- Rendering order in d3.js
- d3.js - reset position variable per sentences
- issue with understanding json syntax
- D3 area graph animation
- D3/Javascript code conundrum?
- Porting D3.js to other languages
- Saving a SVG element as PNG on local system
- How can I collapse (show and hide) the child nodes of a parent node in d3.js?
- How can I add text to SVG elements in D3 using the example below
- Understanding d3 ball bounce
- How to cache a geojson file in d3?
- Transition speeds up after pause/resume
- How to Use large Json file with D3.js
- removing magic number in drawing rows of svg rect
- csv to array in d3.js
- Grouped multiple stacked bar chart
- Automatic zoom on object in D3 force layout
- Line Graph using D3 is not starting from the date i want it to
- Best practices of timeout after Ajax call
- D3/Angular get window size
- dc.js, fill table with data from object dynamically
- How to define the node entering position in D3 js force layout
- responsive SVG using viewbox
- dc-js line chart showing extra filled line at average change
- Hide Circle in d3.js
- d3.js - understand arrow function to append element to g
- Constraints on slider jquery + callng javascript function at page loadto call javascript function
- Format data for D3