score:2

Accepted answer

Based on the source code...

var availableWidth = width - margin.left - margin.right,
    availableHeight = height - margin.top - margin.bottom,
    radius = Math.min(availableWidth, availableHeight) / 2,
    arcRadius = radius-(radius / 5), // radius
    container = d3.select(this);

...the radius is calculated based on width and height, taking the smallest of the two. So, you can only adjust the radius by feeding these dimensions to the chart, like:

var chart = nv.models.pieChart()
    .x(function(d) { return d.label })
    .y(function(d) { return d.value })
    .showLabels(true)
    .donut(true)
    .donutRatio(0.35)
    .width(500) // width
    .height(500); // height

score:0

To change the radius, use:

chart.arcsRadius({"inner":0.6,"outer":0.8}) 

For more information check the examples.

score:1

use chart.arcRadius : {"inner":0.6,"outer":0.9} is used to adjust inner and outer radius chart.donutRatio(0.5) is percent of pie radius to cut out of the middle to make the donut. It is multiplied by the outer radius to calculate the inner radius, thus it should be between 0 and 1.Default is 0.5


Related Query

More Query from same tag