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

Passing functions to radial.x() and radial.y() #113

Closed
wants to merge 2 commits into from
Closed

Passing functions to radial.x() and radial.y() #113

wants to merge 2 commits into from

Conversation

GerardoFurtado
Copy link

@GerardoFurtado GerardoFurtado commented Feb 2, 2018

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 and source code of other forces.

Here is the working demo: https://bl.ocks.org/anonymous/9be75547ffb0ec24a0e0745d41fafd67/f47f6f6650dd0b0d505dfcef55fb63170556c314

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
Passing functions to radial.x() and radial.y()
@Fil
Copy link
Member

Fil commented Jul 6, 2020

I have merged this into #167, which seemed more convenient than having two feature branches.

@Fil Fil closed this Jul 10, 2020
@Fil Fil mentioned this pull request Aug 1, 2020
3 tasks
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.

2 participants