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

Three again #174

Closed
wants to merge 9 commits into from
Closed

Three again #174

wants to merge 9 commits into from

Conversation

Fil
Copy link
Member

@Fil Fil commented Aug 1, 2020

Fixes:

Supersedes #172 #173 ; because of #113 it is a breaking change.

Fil and others added 9 commits July 27, 2020 12:18
Currently, the radial force...

    d3.forceRadial(radius[, x][, y])

... allows only numbers to the `x` and `y` positions:

> If x is specified, sets the x-coordinate of the circle center to the specified number and returns this force.

This proposed change allows passing functions to `radial.x()` and `radial.y()`, using the same pattern of other forces. Here is the working demo: https://bl.ocks.org/anonymous/0685343afe4675a022403be8728bc7c4/7dda06727201c128b9ff820b24c2c955e655436d
and change x,y not vx, vy.
- this makes #81 non-breaking
- strength=1 recenters "at once" for non-interactive graphs (or, for example, the initial phyllotaxis layout)
- strength=0.05 recenters gently for interactive situations such as https://observablehq.com/d/674136693ce67301

fixes #81
@Fil Fil mentioned this pull request Aug 1, 2020
4 tasks
@Fil
Copy link
Member Author

Fil commented Aug 7, 2020

Requesting a review from @enjalot

Demo of forceRadial.angle at https://observablehq.com/d/9187c989f882beee

@enjalot
Copy link

enjalot commented Aug 9, 2020

I took a closer look at forceRadial and don't see anything problematic. I made a deterministic fork of your example to help me pull apart the demo:
https://observablehq.com/d/8f912e218dd99d61

It would be interesting to plot the non-force radial layout as way of understanding (visually verifying) the underlying data distribution. I played towards this here: https://observablehq.com/@enjalot/triangle-world?collection=@enjalot/triangle-world so that I could demonstrate how well UMAP was doing conceptually here: https://observablehq.com/@enjalot/triangle-world-umap?collection=@enjalot/triangle-world

I'd like to do one for forceCenter in this way as well, if only to give people a better sense of what "softer" means.

Screen Shot 2020-08-09 at 4 21 00 PM

@Fil
Copy link
Member Author

Fil commented Aug 13, 2020

@Fil Fil closed this Aug 13, 2020
@Fil Fil deleted the three-minimalist branch August 13, 2020 05:53
Fil added a commit that referenced this pull request Aug 25, 2020
(cherry-picked from #174)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants