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:

http://plnkr.co/edit/zlotf2o6ylkvhkw8dru7?p=preview

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:

enter image description here

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

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -