Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Settings for "charge" force not clear in documentation please help!! #660

Open
gottliebtj opened this issue Jan 17, 2024 · 0 comments

Comments

@gottliebtj
Copy link

gottliebtj commented Jan 17, 2024

The code below works as expected unless i change back to the Cloud Nebula layout the change force is still influced from the last change. i cant seem to find what the exact force is out of the box with the generic 3d force graph. please let me know thanks! Great npm package btw 👍

var simulation = graph.forceEngine("d3");
    if(graphLayout == "Cloud Nebula"){
      simulation.d3Force("collision", () => d3.forceCollide().radius(300));

    }else{
      simulation.d3Force("collision", () => d3.forceCollide().radius(300));
      simulation.d3Force("charge", d3.forceManyBody().strength(-30));
    }

also setting it to null just removes the existing force. Im looking for the exact one that is under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant