john-guerra / forceinabox Goto Github PK
View Code? Open in Web Editor NEWd3 force plugin that implements the GroupInABox algorithm that distributes nodes using a treemap to identify better clusters
License: MIT License
d3 force plugin that implements the GroupInABox algorithm that distributes nodes using a treemap to identify better clusters
License: MIT License
First of all really good extension. Almost what am looking for but am having trouble implementing it.
Fiddle: https://jsfiddle.net/pdubey84/pf3Lb5n2/
Use case
I feel force in a box is somewhat similar to what I want. Do you by any chance have an implementation where multiple networks which are laid out nicely away from each other and grouped can be applied forces so they will open up nicely and won't get affected when one group is applied force with.
The problem:
What I would want?
I would really really help any help or suggestions on how to get this to work
Hello ! I'm using your wonderful plugin for visualization of my network. The problem that i'm facing is that i have 108 groups and 5000 nodes in my graph and with this amount of nodes my groups are overlap, is there a way to do set distance between groups more visible in my case.
Here is my force configuration is looks like
` const force = d3.forceSimulation()
.force('charge', d3.forceManyBody().strength(-1000))
.force('x', d3.forceX(e.data.width / 2).strength(0.01))
.force('y', d3.forceY(e.data.height / 2).strength(0.01));
const groupingForce = forceInABox()
.groupBy('group') // Node attribute to group
.strength(0.18)
.links(links)
.linkStrengthInterCluster(0) // linkStrength between nodes of different clusters
.linkStrengthIntraCluster(0)
.nodeSize(4)
.size([
e.data.width,
e.data.height,
]); // Size of the chart
force
.nodes(nodes)
.force('group', groupingForce)
.force('charge', d3.forceManyBody().strength(-80))
.force('link', d3.forceLink(links)
.distance(300)
.strength(groupingForce.getLinkStrength)
);
`
It is how it looks right now:
PS: I'm new id D3 :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.