javascript - How do I make this inner ring thicker - in other words make the inner white circle's radius less -
i suspect small change following snippet want:
var arc = d3.svg.arc() .startangle(function(d) { return d.x; }) .endangle(function(d) { return d.x + d.dx; }) .outerradius(function(d) { return math.sqrt(d.y) * .9; }) .innerradius(function(d) { return math.sqrt(d.y + d.dy); });
what i'm hoping achieve make inner ring thick outer ring in following - reason being want add text each arc both rings need quite thick:
if want have inner ring showing same width outer ring have use linear function in outerradius
/innerradius
, not use non-linear function sqrt
.
e.g. can try this:
var arc = d3.svg.arc() .startangle(function(d) { return d.x; }) .endangle(function(d) { return d.x + d.dx; }) .outerradius(function(d) { return (d.y+d.dy) / radius; }) .innerradius(function(d) { return d.y / radius; });
in plunk looks this:
this subject condition input parameters (here d.dy
) equal. in plunk example d.dy
7500. make inner ring thicker outer ring have tweak input parameters.
Comments
Post a Comment