visualization goal: build d3 tree has text at, both, nodes , links, , transitions cleanly, when nodes selected/deselected. problem: while can link text, called "predicates," show along centroid of link paths, can't seem them transition in , out "smoothly." question: can please me please me clean code , better understand how tree "link" transitions behaving understand theory behind code? visualization , source location: http://bl.ocks.org/guerino1/raw/ed80661daf8e5fa89b85/ the existing code looks follows... var linktextitems = vis.selectall("g.linktext") .data(tree.links(nodes), function(d) { return d.target.id; }) var linktextenter = linktextitems.enter().append("svg:g") .attr("class", "linktext") .attr("transform", function(d) { return "translate(" + (d.target.y + 20) + "," + (getcenterx(d)) + ")"; }); // add predicate text each link path li...
Comments
Post a Comment