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.append(node) is not working in d3.js, so needs to be changed to the function returning node #439

Closed
shamansir opened this issue Feb 17, 2017 · 4 comments

Comments

@shamansir
Copy link
Owner

shamansir commented Feb 17, 2017

I can't believe I used d3_tiny's .append(node) ability every time, but by docs it seems it is exactly what actually happened.

@shamansir shamansir changed the title d3.append(node) is not working anymore in d3.js 4.x, so needs to be changed to function d3.append(node) is not working in d3.js, so needs to be changed to function returning node Feb 17, 2017
@shamansir shamansir changed the title d3.append(node) is not working in d3.js, so needs to be changed to function returning node d3.append(node) is not working in d3.js, so needs to be changed to the function returning node Feb 17, 2017
@shamansir
Copy link
Owner Author

shamansir commented Feb 17, 2017

The difference is that I usually use code like this:

var d3Selection = d3.select(...)...;
var anotherD3Selection = d3.select(...)...;
d3Selection.....append(anotherD3Selection.node());

but according to d3.js docs, it was wrong from the start (but so intuitive!)

@shamansir
Copy link
Owner Author

And so, relates to #405

@shamansir
Copy link
Owner Author

shamansir commented Feb 17, 2017

For now, I'm changing it to:

var ƒ = Rpd.unit;

d3.....append(ƒ(d3().....node()));

But probably in some cases it would be convenient to use selection.append('svg:text') syntax. And make d3_tiny use it too.

shamansir added a commit that referenced this issue Feb 17, 2017
….append(Rpd.unit(node)) everywhere, still some examples do fail
@shamansir
Copy link
Owner Author

Fixed with #440

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

No branches or pull requests

1 participant