Line 68: | Line 68: | ||
stroke: steelblue; | stroke: steelblue; | ||
stroke-width: 2.5px; | stroke-width: 2.5px; | ||
− | r: | + | r:15; |
} | } | ||
.node text { | .node text { | ||
− | font: | + | font: 18px sans-serif; |
} | } | ||
Line 101: | Line 101: | ||
var margin = {top: 20, right: 120, bottom: 20, left: 120}, | var margin = {top: 20, right: 120, bottom: 20, left: 120}, | ||
width = 860 - margin.right - margin.left, | width = 860 - margin.right - margin.left, | ||
− | height = | + | height = 950 - margin.top - margin.bottom; |
var i = 0, | var i = 0, | ||
Line 138: | Line 138: | ||
}); | }); | ||
− | d3.select(self.frameElement).style("height", " | + | d3.select(self.frameElement).style("height", "950px"); |
function update(source) { | function update(source) { | ||
Line 164: | Line 164: | ||
nodeEnter.append("text") | nodeEnter.append("text") | ||
− | .attr("x", function(d) { return d.children || d._children ? - | + | .attr("x", function(d) { return d.children || d._children ? -25 : 25; }) |
.attr("dy", ".35em") | .attr("dy", ".35em") | ||
.attr("text-anchor", function(d) { return d.children || d._children ? "end" : "start"; }) | .attr("text-anchor", function(d) { return d.children || d._children ? "end" : "start"; }) |
Revision as of 02:15, 17 October 2016