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

d3.forceCollideRect? #110

Open
martgnz opened this issue Jan 3, 2018 · 4 comments
Open

d3.forceCollideRect? #110

martgnz opened this issue Jan 3, 2018 · 4 comments

Comments

@martgnz
Copy link

martgnz commented Jan 3, 2018

While making cartograms I'm finding that the collide function of this block works much better than just using d3.forceCollide, as it seems to be made for squares rather than circles with a certain radius.

Is there a way to emulate its behaviour with the current forces available? If not, does it make sense to have it inside d3-force in some form?

@vasturiano
Copy link
Contributor

@martgnz you may want to have a look at d3-bboxCollide. That force plugin aims to solve exactly what you're describing.

@martgnz
Copy link
Author

martgnz commented Jan 10, 2018

@vasturiano Great find! Thanks, I'll try it.

But I still think that it makes sense to have this force inside d3 in some form or another.

@Fil
Copy link
Member

Fil commented Jun 25, 2020

Related: mapbox/polylabel#63

@curran
Copy link
Contributor

curran commented Jun 25, 2020

Also related: d3fc-label-layout

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

No branches or pull requests

4 participants