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

Link shape. #21

Closed
mbostock opened this issue Dec 5, 2015 · 1 comment
Closed

Link shape. #21

mbostock opened this issue Dec 5, 2015 · 1 comment

Comments

@mbostock
Copy link
Member

mbostock commented Dec 5, 2015

Supersedes d3/d3-shape#27.

@mbostock
Copy link
Member Author

I’m not entirely sure we need a link generator:

var link = svg.selectAll(".link")
    .data(nodes.slice(1))
  .enter().append("path")
    .attr("class", "link")
    .attr("d", function(d) {
      return "M" + d.y + "," + d.x
          + "C" + (d.y + d.parent.y) / 2 + "," + d.x
          + " " + (d.y + d.parent.y) / 2 + "," + d.parent.x
          + " " + d.parent.y + "," + d.parent.x;
    });

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

1 participant