2014-01-14 134 views

回答

7

呼叫.sizeRange([minArea, maxArea])。请注意,“大小”与面积成正比,而不是半径,因此您需要使用最大/最小半径的平方(如果要精确,请用pi/2调整)。

4

自1.7.1起,致电.pointRange([minArea,maxArea])

2
nv.addGraph(function() { 
    var chart = nv.models.scatterChart() 
       .showDistX(true) 
      .sizeRange([1000, 100]) /*****Chart Circle Range******/ 
       .showDistY(true) 
       .color(d3.scale.category10().range()); 


    chart.xAxis.tickFormat(d3.format('.02f')); 
    chart.yAxis.tickFormat(d3.format('.02f')); 

    d3.select('#chart svg') 
     .datum(data(4,40)) 
    .transition().duration(500) 
     .call(chart); 

    nv.utils.windowResize(chart.update); 

    return chart; 
}); 

Use this this link或上述代码应用到这个LINK

.sizeRange([minArea,maxArea])

例如:.sizeRange([1000,100])