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

How to control the length between nodes and clusters of nodes #302

Open
moda20 opened this issue Jan 23, 2023 · 3 comments
Open

How to control the length between nodes and clusters of nodes #302

moda20 opened this issue Jan 23, 2023 · 3 comments

Comments

@moda20
Copy link

moda20 commented Jan 23, 2023

Hi, i am creating a graph with a central node and 4 clusters each with as mcuh as 1k nodes, the issue i am having is the distance between the central node and the clusters. this doesn't seem to be configurable in any way from the available interface.
by default the length it seems to be related to the number of nodes in each cluster, but can't be configured to be otherway

in the attached pic, the length i am speaking with is the dashed line

Screenshot 2023-01-23 at 16 06 11

@vasturiano
Copy link
Owner

You can control the intended distances per link using the forceLink distance method.

This method can be accessed via:

myGraph.d3Force('link').distance(link => ...)

@moda20
Copy link
Author

moda20 commented Jan 25, 2023

@vasturiano thanks, but the a small problem there is that i also need to change the charge force to achieve what i want to do but that has a weird bug, and i created an issue about it

@Yass525
Copy link

Yass525 commented Sep 14, 2023

Hello @moda20,

can i have the code you used for clustering?

Thank you.

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

3 participants