Comments (4)
Thanks for your help - I got it working - you can see it here: https://reagraph.dev/?path=/story/demos-cluster--three-dimensions
from d3-force-cluster-3d.
@amcdnl that accessor method should return the central coordinates of the cluster the node is associated to. Or you can choose a node in each cluster that represents the cluster center and just return that node object for the associated nodes.
I noticed that your force diagrams are in 2D. For that, ther regular d3-force-cluster module should suffice. Any specific reason why you prefer to use the 3d variant?
from d3-force-cluster-3d.
should return the central coordinates of the cluster the node is associated to
OK - Thats helpful. Is there a library you would recommend to calculate this?
Any specific reason why you prefer to use the 3d variant?
The library also supports 3D, I was just going to use this for both 2d and 3d. I assumed that would work if I just removed the Z dimension.
from d3-force-cluster-3d.
Is there a library you would recommend to calculate this?
Nothing comes to mind. A common pattern as I mentioned above is to simply use one of the nodes in the cluster as the cluster center. Assuming there are other forces active in the system, this way the cluster centers also keep moving and adjust to each other.
The library also supports 3D, I was just going to use this for both 2d and 3d. I assumed that would work if I just removed the Z dimension.
Ok. Yeah that should work fine. As long as the main force engine is configured with the matching number of dimensions, via numDimensions.
from d3-force-cluster-3d.
Related Issues (5)
- example of d3-force-cluster-3d? HOT 2
- How to use this one? HOT 3
- cluster attract ?? or more closer nodes HOT 2
- Unstable z values HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-force-cluster-3d.