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

Group nodes without links #1

Closed
Benkevych opened this issue Apr 10, 2018 · 4 comments
Closed

Group nodes without links #1

Benkevych opened this issue Apr 10, 2018 · 4 comments

Comments

@Benkevych
Copy link

Can i somehow connect couple of nodes in 1 group but without visible links?

@vasturiano
Copy link
Owner

There's probably different ways to achieve that, depending on what your intention is.
If it's just a visual difference and you simply wish to hide certain links, you can do that by setting a fully transparent color on those links. Something like:

linkColor={link => shouldHideLink(link) ? 'rgba(0, 0, 0, 0)' : link.color}

If however you wish to group nodes in another manner than not by the link force (or by configuring the link force in a different way) you can manipulate the internals of the forces in play in the system using the d3Force method.

@Benkevych
Copy link
Author

i`ve tried that, and my links appear just black instead of transparent...

@vasturiano
Copy link
Owner

Seems like it's ignoring the alpha part. Are you using rgba? Also, are you running the latest version of react-force-graph?

@Benkevych
Copy link
Author

I don`t know what was the issue, but everything works fine after reinstalling package. Both was latest versions...
Thank you for your time)

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

2 participants