期望的样子:文字在圆圈的上面,不会被圆遮挡
但是之前按以下的代码写肯定会有部分文字被旁边的圆遮挡
var bubbles = svg.selectAll(".bubble")
.data(nodes.filter(function(d) {
return !d.children;
}))
.enter()
.append("g")
.attr("class","bubble");
bubbles.append("circle")
.style("fill",function(d,i){
var t;
var color;
if (d.weight > middlevalue)
{
t = linear2(d.weight);
color = computeColor2(t);
}
else
{
t