javascript - Positioning the edges using dagre-d3 -


i have graph edges overlapping nodes this

graph

  1. can make edges start right middle of node instead of top center image graph2
  2. is there attribute takes care of issue?

yeah, should able relatively easily. need provide code demonstrate, want add x-value lines.

.attr("x", function(d) { return d.x + nodewidth / 2; }); 

so if you're adding lines you're code might like:

var links = d3.selectall(".link")               .data(data)               .enter()               .attr("x1", function(d) { return d.x1 + nodewidth / 2; })               .attr("y1", function(d) { return d.y1; })               .attr("x2", function(d) { return d.x2; })               .attr("y2", function(d) { return d.y2; }); 

Comments